Working Directory

Importation du tableau de données

Téléchargement du tableau, garder surtout les informations des ordres

Sélection est faite à la main, pour chaque ordre (Diptera, Hymenoptera, Coleoptera) et pour la sélection Autres, correspond donc à tous les autres groupes n’appartenant pas à ces ordres.

En suite, on regroupe Arachnida étant donné qu’ils ne font pas partie des insectes.

Hymenoptera

Piege Hymeno

Extraction du tableau Filet & enlèvement des Soirs

Regroupement par individu dans le tableau Filet (division par 3 du nombre de lignes attendu)

Regroupement par individu dans le tableau Piège (passage de 81 à 27 lignes attendu)

filetH piegeH

Diptera

Piege Diptera

Extraction du tableau Filet & enlèvement des Soirs

Regroupement par individu dans le tableau Filet (division par 3 du nombre de lignes attendu)

Regroupement par individu dans le tableau Piège (passage de 81 à 27 lignes attendu)

filetD piegeD

Coleoptera

Piege Coleoptera

Extraction du tableau Filet & enlèvement des Soirs

Regroupement par individu dans le tableau Filet (division par 3 du nombre de lignes attendu)

Regroupement par individu dans le tableau Piège (passage de 81 à 27 lignes attendu)

filetC piegeC

Autres groupes d’insectes

Piege Autres

Extraction du tableau Filet & enlèvement des Soirs

Regroupement par individu dans le tableau Filet (division par 3 du nombre de lignes attendu)

Regroupement par individu dans le tableau Piège (passage de 81 à 27 lignes attendu)

###Récupération des matrices

Récupérer la matrice piege

Récupérer la matrice filet

Filet tout

filetfe<-subset(filet,filet$Saison=="Fevrier")
filetao<-subset(filet,filet$Saison=="Aout")
filetju<-subset(filet,filet$Saison=="Juin")

filetfex<-aggregate( . ~ identifiant_arbre, filetfe[,-(2:5)], sum)
filetfen<-aggregate( . ~ identifiant_arbre, filetfe[,(1:5)], max)
filetfe<-left_join(filetfen,filetfex,by="identifiant_arbre")

filetaox<-aggregate( . ~ identifiant_arbre, filetao[,-(2:5)], sum)
filetaon<-aggregate( . ~ identifiant_arbre, filetao[,(1:5)], max)
filetao<-left_join(filetaon,filetaox,by="identifiant_arbre")

filetjux<-aggregate( . ~ identifiant_arbre, filetju[,-(2:5)], sum)
filetjun<-aggregate( . ~ identifiant_arbre, filetju[,(1:5)], max)
filetju<-left_join(filetjun,filetjux,by="identifiant_arbre")

filetall<-bind_rows(filetju,filetao)
filetall<-bind_rows(filetall,filetfe)

Piege tout

piegefe<-subset(piege,piege$Saison=="Fevrier")
piegeao<-subset(piege,piege$Saison=="Aout")
piegeju<-subset(piege,piege$Saison=="Juin")

piegefex<-aggregate( . ~ identifiant_arbre, piegefe[,-(2:5)], sum)
piegefen<-aggregate( . ~ identifiant_arbre,piegefe[,(1:5)], max)
piegefe<-left_join(piegefen,piegefex,by="identifiant_arbre")

piegeaox<-aggregate( . ~ identifiant_arbre, piegeao[,-(2:5)], sum)
piegeaon<-aggregate( . ~ identifiant_arbre, piegeao[,(1:5)], max)
piegeao<-left_join(piegeaon,piegeaox,by="identifiant_arbre")

piegejux<-aggregate( . ~ identifiant_arbre, piegeju[,-(2:5)], sum)
piegejun<-aggregate( . ~ identifiant_arbre, piegeju[,(1:5)], max)
piegeju<-left_join(piegejun,piegejux,by="identifiant_arbre")

piegeall<-bind_rows(piegeju,piegeao)
piegeall<-bind_rows(piegeall,piegefe)

Courbes de raréfaction

+Rang/Abondance Problème avec les courbes de raréfaction Calculs estimateurs des taux de complétude pour modèle réfaction (non utilisés ici mais pour avoir une base non biaisé si usage, à reprendre, ici la couverture)

Filet - Préparation du tableau

Piège - Préparation des tableaux

Filet - Modèle et Courbes

Pièges - Modèle et Courbes

#Estimateurs de diversité Filet selon la saison

ChaoRichness(NEX2)
##         Observed Estimator Est_s.e. 95% Lower 95% Upper
## Aout         124   240.376   39.182   185.226   345.202
## Fevrier      159   305.759   45.495   240.052   424.735
## Juin          72   110.144   19.264    86.987   169.081
ChaoShannon(NEX2)
##         Observed Estimator Est_s.e 95% Lower 95% Upper
## Aout       4.112     4.426   0.090     4.251     4.602
## Fevrier    4.104     4.364   0.082     4.204     4.523
## Juin       3.192     3.322   0.081     3.192     3.481
DataInfo(NEX2)
##   Assemblage   n S.obs     SC f1 f2 f3 f4 f5 f6 f7 f8 f9 f10
## 1       Aout 401   124 0.8257 70 21  8  7  5  1  1  1  1   1
## 2    Fevrier 611   159 0.8626 84 24 15  8  8  2  3  1  1   1
## 3       Juin 458    72 0.9368 29 11  8  3  6  3  3  0  1   0
ChaoRichness(NEX2p)
##         Observed Estimator Est_s.e. 95% Lower 95% Upper
## Aout         104   170.580   25.975   135.838   243.233
## Fevrier       90   257.878   70.213   166.425   458.767
## Juin          64   124.403   30.134    87.976   216.174
ChaoShannon(NEX2p)
##         Observed Estimator Est_s.e 95% Lower 95% Upper
## Aout       3.491     3.649   0.076     3.499     3.799
## Fevrier    2.573     2.794   0.111     2.576     3.012
## Juin       2.661     2.763   0.063     2.661     2.887
DataInfo(NEX2p)
##   Assemblage   n S.obs     SC f1 f2 f3 f4 f5 f6 f7 f8 f9 f10
## 1       Aout 584   104 0.9162 49 18  7  7  5  3  3  1  0   2
## 2    Fevrier 523    90 0.8892 58 10  5  3  2  3  2  1  0   0
## 3       Juin 624    64 0.9472 33  9  2  4  3  1  1  0  0   2

Rang-Abondance

Tout

Distribution en log-norm? Seule qui fit

Si l’abondance de chaque espèce est proportionnelle aux ressources dont elle dispose, ->Ce mécanisme décrit assez bien un mécanisme de partage successif des ressources, par exemple entre groupes d’espèces de plus en plus petits, correspondant à des niches écologiques de plus en plus étroites

Phénomène d’emboîtement dans la méta-communauté ?

###Beta de Jaccard Diagramme de Venn - Filet

## (polygon[GRID.polygon.256], polygon[GRID.polygon.257], polygon[GRID.polygon.258], polygon[GRID.polygon.259], polygon[GRID.polygon.260], polygon[GRID.polygon.261], text[GRID.text.262], text[GRID.text.263], text[GRID.text.264], text[GRID.text.265], text[GRID.text.266], text[GRID.text.267], text[GRID.text.268], text[GRID.text.269], text[GRID.text.270], text[GRID.text.271])

Diagramme de Venn - Piege

## (polygon[GRID.polygon.272], polygon[GRID.polygon.273], polygon[GRID.polygon.274], polygon[GRID.polygon.275], polygon[GRID.polygon.276], polygon[GRID.polygon.277], text[GRID.text.278], text[GRID.text.279], text[GRID.text.280], text[GRID.text.281], text[GRID.text.282], text[GRID.text.283], text[GRID.text.284], text[GRID.text.285], text[GRID.text.286], text[GRID.text.287])

Traitement des données

Préparation des données pour les calculs, conservation uniquement des “numeric”

Le nombre d’individus pour chaque espèce selon piège/filet

L’abondance d’insectes par arbre selon piège/filet

filet$norga<-apply(filetx,1,sum)
filet$norga
##   [1]  7  0  2  6 11  5  4  3  3  2  1  2  2  4  2  1  2  0  1  2  0  2  2  3  3
##  [26]  4  0  1  4  2  2  3  2  5  2  0  6  7  7  4  5  1  3  5  3  9 11  6  5  6
##  [51] 14 17 10 16 16  4  8  6 46 27 29 24 17 28 19 30 30 51 36  6 32 20  9 11 11
##  [76] 12 23 27 17 14 20 24 42 21  4  8  5  2 14 17  7  3  5  2  7  4  5 11  6 11
## [101]  4 31 18 26 19  3 30 11  3  3  4  2 29  4  2  0  2  2  2  2  1  3  2  5  6
## [126]  3  0  4  1  1  4 18  4  4  1  8  1 31  4  7  2 11  9  3  3  2  2  1  2  2
## [151]  3  2  9  2  1  1  2  0  0  2  3 74  2  7  4  0  6  3  0  1  1  4
piege$norga<-apply(piegex,1,sum)
piege$norga
##   [1]   7   0   3   7   2   2   2   0   2   0   1   0   0   4   1   4   2   2
##  [19]   9   1   1   2   0   1   1   9   1   4  25   4  41   7   1   5   5   6
##  [37]   0   8   3 225   9  31   7   5   5 137   8   5  24  12  70 126  29   5
##  [55]  13  24  80  49 134  20   7  21   7   3   3  22   6  46   3  23   8   6
##  [73]  12   2   6   9   3   4  22  21   4  19  25  18   3  15   6   7   6   2
##  [91]   2   1   6   8  41   7  16   9  11   1   2  16  34  17  15   5   4   6
l<-function(x){
  x<-length(x[x!=0])
  }
filet$rspe<-apply(filetx,1,l)
filet$rspe
##   [1]  2  0  2  5  3  3  3  1  3  1  1  2  2  3  1  1  2  0  1  1  0  2  2  3  2
##  [26]  2  0  1  2  2  1  3  2  2  2  0  5  3  4  4  2  1  2  5  2  6  8  3  4  6
##  [51]  6 10  6 10 12  4  6  4 25 13 16 15  8 14 13 23 18 21 23  6 23  5  3  7  7
##  [76]  7  9  8  8  4  7  5  9  5  4  5  4  2  7  8  4  2  3  2  6  4  4  7  5  7
## [101]  3  6  8  5  4  2  5  4  2  3  4  2  8  2  2  0  1  2  2  1  1  2  1  4  5
## [126]  1  0  3  1  1  3  7  3  3  1  5  1 10  3  3  2  4  3  3  3  1  2  1  2  2
## [151]  2  2  3  2  1  1  2  0  0  2  3  4  1  5  4  0  5  2  0  1  1  4
piege$rspe<-apply(piegex,1,l)
piege$rspe
##   [1]  3  0  2  4  2  2  2  0  2  0  1  0  0  4  1  3  1  2  4  1  1  1  0  1  1
##  [26]  3  1  3 15  4  8  7  1  4  3  5  0  4  3  1  7  2  6  5  5  6  2  3  8  7
##  [51]  5  7  8  5  7 14 10  9 14 11  5 10  5  3  3 12  6  6  2  9  7  6  2  2  4
##  [76]  3  2  4  4  5  4  2  6  4  2  5  5  4  5  2  2  1  4  6 12  4  7  5  8  1
## [101]  1  1  3  3  3  3  3  2

Tableau de synthèse (export en csv mieux)

###Analyses statstiques Partie 2 spécifique et d’abondance selon les méthodes des pièges et des filets pour chaque saison et l’effet saison / site

Filet - Richesse spécifique

## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

glma<-glmer(rspe ~ site*Saison+(1|ordre), data = syntfilet, family=poisson, nAGQ=2) #Estimation des paramètres du modèle par la Quadrature de Gauss-Hermite (Bolker, 2008) 
summary(glma)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * Saison + (1 | ordre)
##    Data: syntfilet
## 
##      AIC      BIC   logLik deviance df.resid 
##    286.3    317.7   -133.1    266.3      162 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.3412 -1.0107 -0.1219  0.7666  4.8066 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  ordre  (Intercept) 0.3535   0.5945  
## Number of obs: 172, groups:  ordre, 4
## 
## Fixed effects:
##                                 Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    1.240e+00  3.175e-01   3.906 9.39e-05 ***
## siteExt_Reserve               -4.041e-06  1.543e-01   0.000 0.999979    
## siteReserve                   -1.001e-01  1.583e-01  -0.632 0.527240    
## SaisonFevrier                  5.179e-01  1.378e-01   3.758 0.000171 ***
## SaisonJuin                    -6.242e-01  1.847e-01  -3.379 0.000728 ***
## siteExt_Reserve:SaisonFevrier -3.949e-01  2.201e-01  -1.794 0.072807 .  
## siteReserve:SaisonFevrier     -9.508e-02  2.019e-01  -0.471 0.637748    
## siteExt_Reserve:SaisonJuin     4.838e-01  2.444e-01   1.980 0.047751 *  
## siteReserve:SaisonJuin         5.129e-01  2.490e-01   2.060 0.039379 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.243                                                   
## siteReserve -0.237  0.487                                            
## SaisonFevrr -0.272  0.560  0.546                                     
## SaisonJuin  -0.203  0.418  0.407  0.468                              
## stExt_Rs:SF  0.170 -0.701 -0.342 -0.626 -0.293                       
## stRsrv:SsnF  0.186 -0.382 -0.784 -0.683 -0.319  0.427                
## stExt_Rs:SJ  0.153 -0.631 -0.308 -0.353 -0.756  0.443   0.241        
## stRsrv:SsnJ  0.151 -0.310 -0.636 -0.347 -0.742  0.217   0.498  0.561
Anova(glma, type=3, method="chisq") #methode chis2 car glmer et type 3 car plan déséquilibré et présence d'une interaction
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: rspe
##               Chisq Df Pr(>Chisq)    
## (Intercept) 15.2554  1  9.391e-05 ***
## site         0.5242  2   0.769440    
## Saison      47.8746  2  4.019e-11 ***
## site:Saison 14.0343  4   0.007186 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
## This is DHARMa 0.4.6. For overview type '?DHARMa'. For recent changes, type news(package = 'DHARMa')
plot(simulateResiduals(glma))

library(MuMIn) #Détermination du r2
## Registered S3 method overwritten by 'MuMIn':
##   method          from    
##   model.frame.lme contrast
r.squaredGLMM(glma) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: 'r.squaredGLMM' now calculates a revised statistic. See the help page.
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.1433366 0.6575384
## lognormal 0.1485238 0.6813336
## trigamma  0.1373694 0.6301646
#trigamma la plus fiable

TEST - PAIRWISE

emta1 <- lsmeans(glma, ~ site, by="Saison")
pairs(emta1)
## Saison = Aout:
##  contrast                  estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  0.000004 0.154 Inf   0.000  1.0000
##  (Bas-fond) - Reserve      0.100089 0.158 Inf   0.632  0.8024
##  Ext_Reserve - Reserve     0.100085 0.158 Inf   0.632  0.8024
## 
## Saison = Fevrier:
##  contrast                  estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  0.394878 0.157 Inf   2.516  0.0319
##  (Bas-fond) - Reserve      0.195167 0.125 Inf   1.557  0.2645
##  Ext_Reserve - Reserve    -0.199711 0.162 Inf  -1.235  0.4327
## 
## Saison = Juin:
##  contrast                  estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve -0.483801 0.190 Inf  -2.553  0.0288
##  (Bas-fond) - Reserve     -0.412860 0.192 Inf  -2.148  0.0803
##  Ext_Reserve - Reserve     0.070941 0.169 Inf   0.421  0.9070
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emta2 <- lsmeans(glma, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emta2)
##  contrast       estimate     SE  df z.ratio p.value
##  Aout - Fevrier   -0.355 0.0883 Inf  -4.015  0.0002
##  Aout - Juin       0.292 0.0987 Inf   2.959  0.0087
##  Fevrier - Juin    0.647 0.0965 Inf   6.697  <.0001
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Filet - Abondance

## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

glmb<-glmer(norga ~ site*Saison+(1+Saison+site|ordre), data = syntfilet, family=poisson, nAGQ=1) #Estimation des paramètres du modèle par l'approximation de Laplace(Bolker, 2008) -> trop de facteurs aléatoires nécessaires au calcul du modèle pour faire une quadrature de Gausse-Hermite (impossible pour la fonction si plus de 1 et en général si + de 2,3)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.00682423 (tol = 0.002, component 1)
summary(glmb)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: poisson  ( log )
## Formula: norga ~ site * Saison + (1 + Saison + site | ordre)
##    Data: syntfilet
## 
##      AIC      BIC   logLik deviance df.resid 
##   1289.5   1365.0   -620.7   1241.5      148 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -3.6659 -1.1412 -0.4110  0.7298 15.9840 
## 
## Random effects:
##  Groups Name            Variance Std.Dev. Corr                   
##  ordre  (Intercept)     0.2463   0.4963                          
##         SaisonFevrier   0.8893   0.9430    0.17                  
##         SaisonJuin      0.5059   0.7113    0.83 -0.03            
##         siteExt_Reserve 0.5121   0.7156   -0.34  0.28 -0.81      
##         siteReserve     0.5170   0.7190   -0.79  0.45 -0.67  0.33
## Number of obs: 172, groups:  ordre, 4
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                     1.8807     0.2633   7.142 9.17e-13 ***
## siteExt_Reserve                -0.1872     0.3814  -0.491  0.62352    
## siteReserve                    -0.1718     0.3822  -0.450  0.65301    
## SaisonFevrier                  -0.1325     0.4888  -0.271  0.78632    
## SaisonJuin                     -1.0376     0.3863  -2.686  0.00724 ** 
## siteExt_Reserve:SaisonFevrier   0.1624     0.1762   0.922  0.35667    
## siteReserve:SaisonFevrier       0.2428     0.1654   1.467  0.14224    
## siteExt_Reserve:SaisonJuin      1.3038     0.1857   7.020 2.22e-12 ***
## siteReserve:SaisonJuin          1.1610     0.1888   6.151 7.71e-10 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.378                                                   
## siteReserve -0.776  0.348                                            
## SaisonFevrr  0.100  0.288  0.446                                     
## SaisonJuin   0.655 -0.651 -0.539  0.019                              
## stExt_Rs:SF  0.150 -0.219 -0.103 -0.156 -0.116                       
## stRsrv:SsnF  0.163 -0.109 -0.236 -0.167 -0.128  0.480                
## stExt_Rs:SJ  0.134 -0.211 -0.091 -0.083 -0.290  0.495   0.254        
## stRsrv:SsnJ  0.137 -0.089 -0.212 -0.085 -0.287  0.235   0.541  0.563 
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## Model failed to converge with max|grad| = 0.00682423 (tol = 0.002, component 1)
Anova(glmb, type=3, method="chisq") #methode chis2 car glmer et type 3 car plan déséuilibré
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: norga
##               Chisq Df Pr(>Chisq)    
## (Intercept) 51.0137  1  9.173e-13 ***
## site         0.3294  2    0.84816    
## Saison       7.2623  2    0.02649 *  
## site:Saison 64.3497  4  3.527e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmb))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmb) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
## boundary (singular) fit: see help('isSingular')
##                  R2m       R2c
## delta     0.08901978 0.9067331
## lognormal 0.08943409 0.9109532
## trigamma  0.08856513 0.9021022
#trigamma la plus fiable

PAIRWISE

emtb1 <- lsmeans(glmb, ~ site, by="Saison")
pairs(emtb1)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.1872 0.381 Inf   0.491  0.8757
##  (Bas-fond) - Reserve       0.1718 0.382 Inf   0.450  0.8946
##  Ext_Reserve - Reserve     -0.0154 0.436 Inf  -0.035  0.9993
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.0249 0.383 Inf   0.065  0.9977
##  (Bas-fond) - Reserve      -0.0709 0.379 Inf  -0.187  0.9809
##  Ext_Reserve - Reserve     -0.0958 0.435 Inf  -0.220  0.9736
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -1.1166 0.387 Inf  -2.882  0.0110
##  (Bas-fond) - Reserve      -0.9892 0.389 Inf  -2.545  0.0294
##  Ext_Reserve - Reserve      0.1274 0.431 Inf   0.295  0.9530
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtb2 <- lsmeans(glmb, ~ Saison) #changer l'écriture de la formule
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtb2)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier -0.00254 0.480 Inf  -0.005  1.0000
##  Aout - Juin     0.21600 0.366 Inf   0.591  0.8250
##  Fevrier - Juin  0.21854 0.606 Inf   0.361  0.9308
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Piege - Richesse spécifique

## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.4), : Ignoring unknown aesthetics: ymin and ymax

glmc<-glmer(rspe ~ site*Saison+(1|ordre), data = syntpiege, family=poisson, nAGQ=2)
summary(glmc)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * Saison + (1 | ordre)
##    Data: syntpiege
## 
##      AIC      BIC   logLik deviance df.resid 
##    182.4    209.2    -81.2    162.4       98 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.2761 -0.7517 -0.1570  0.4861  4.3142 
## 
## Random effects:
##  Groups Name        Variance Std.Dev.
##  ordre  (Intercept) 0.258    0.5079  
## Number of obs: 108, groups:  ordre, 4
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                     1.3361     0.2911   4.589 4.45e-06 ***
## siteExt_Reserve                 0.0290     0.1841   0.158  0.87483    
## siteReserve                     0.3309     0.1836   1.803  0.07146 .  
## SaisonFevrier                   0.2271     0.1877   1.210  0.22641    
## SaisonJuin                     -0.6360     0.2380  -2.672  0.00754 ** 
## siteExt_Reserve:SaisonFevrier  -0.1448     0.2754  -0.526  0.59893    
## siteReserve:SaisonFevrier      -0.7762     0.2715  -2.859  0.00425 ** 
## siteExt_Reserve:SaisonJuin      0.3640     0.3097   1.175  0.23984    
## siteReserve:SaisonJuin          0.2235     0.3033   0.737  0.46131    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.366                                                   
## siteReserve -0.367  0.580                                            
## SaisonFevrr -0.359  0.567  0.569                                     
## SaisonJuin  -0.283  0.447  0.449  0.439                              
## stExt_Rs:SF  0.245 -0.669 -0.388 -0.682 -0.299                       
## stRsrv:SsnF  0.248 -0.392 -0.676 -0.691 -0.303  0.471                
## stExt_Rs:SJ  0.217 -0.594 -0.345 -0.337 -0.768  0.397   0.233        
## stRsrv:SsnJ  0.222 -0.351 -0.605 -0.344 -0.785  0.235   0.409  0.603
Anova(glmc, type=3, method="chisq")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: rspe
##              Chisq Df Pr(>Chisq)    
## (Intercept) 21.061  1  4.448e-06 ***
## site         4.439  2  0.1086621    
## Saison      14.172  2  0.0008369 ***
## site:Saison 13.562  4  0.0088326 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmc))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmc) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.1301930 0.5842498
## lognormal 0.1359748 0.6101962
## trigamma  0.1236490 0.5548831
#trigamma la plus fiable

TEST - PAIRWISE

emtc1 <- lsmeans(glmc, ~ site, by="Saison")
pairs(emtc1)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.029 0.184 Inf  -0.158  0.9864
##  (Bas-fond) - Reserve       -0.331 0.184 Inf  -1.803  0.1687
##  Ext_Reserve - Reserve      -0.302 0.168 Inf  -1.792  0.1722
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.116 0.205 Inf   0.566  0.8384
##  (Bas-fond) - Reserve        0.445 0.200 Inf   2.226  0.0668
##  Ext_Reserve - Reserve       0.329 0.225 Inf   1.463  0.3088
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.393 0.249 Inf  -1.578  0.2551
##  (Bas-fond) - Reserve       -0.554 0.241 Inf  -2.295  0.0564
##  Ext_Reserve - Reserve      -0.161 0.215 Inf  -0.750  0.7338
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtc2 <- lsmeans(glmc, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtc2)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier   0.0799 0.113 Inf   0.709  0.7580
##  Aout - Juin      0.4402 0.121 Inf   3.644  0.0008
##  Fevrier - Juin   0.3602 0.129 Inf   2.794  0.0144
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Piege - Abondance

## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.4), : Ignoring unknown aesthetics: ymin and ymax

glmd<-glmer(norga ~ site*Saison+(1+site+Saison|ordre), data = syntpiege, family=poisson)
## Warning in checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, :
## Model failed to converge with max|grad| = 0.0101821 (tol = 0.002, component 1)
summary(glmd)
## Generalized linear mixed model fit by maximum likelihood (Laplace
##   Approximation) [glmerMod]
##  Family: poisson  ( log )
## Formula: norga ~ site * Saison + (1 + site + Saison | ordre)
##    Data: syntpiege
## 
##      AIC      BIC   logLik deviance df.resid 
##   1603.0   1667.4   -777.5   1555.0       84 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -7.8631 -1.5024 -0.4863  1.1697 19.1190 
## 
## Random effects:
##  Groups Name            Variance Std.Dev. Corr                   
##  ordre  (Intercept)     1.1881   1.0900                          
##         siteExt_Reserve 0.2843   0.5332   -0.44                  
##         siteReserve     1.0735   1.0361   -0.49  0.51            
##         SaisonFevrier   0.7956   0.8920   -0.71  0.94  0.68      
##         SaisonJuin      1.1089   1.0530   -0.88  0.82  0.60  0.95
## Number of obs: 108, groups:  ordre, 4
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                     1.3290     0.5629   2.361  0.01823 *  
## siteExt_Reserve                 0.4757     0.3152   1.509  0.13124    
## siteReserve                     1.5333     0.5407   2.836  0.00457 ** 
## SaisonFevrier                   0.5525     0.4787   1.154  0.24844    
## SaisonJuin                      0.1153     0.5609   0.205  0.83720    
## siteExt_Reserve:SaisonFevrier   0.0898     0.2048   0.439  0.66102    
## siteReserve:SaisonFevrier      -1.0473     0.1916  -5.465 4.62e-08 ***
## siteExt_Reserve:SaisonJuin      0.4479     0.2227   2.012  0.04426 *  
## siteReserve:SaisonJuin         -0.3416     0.2127  -1.606  0.10834    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.467                                                   
## siteReserve -0.514  0.519                                            
## SaisonFevrr -0.706  0.841  0.670                                     
## SaisonJuin  -0.859  0.740  0.596  0.902                              
## stExt_Rs:SF  0.134 -0.361 -0.137 -0.258 -0.140                       
## stRsrv:SsnF  0.149 -0.252 -0.192 -0.285 -0.157  0.657                
## stExt_Rs:SJ  0.133 -0.356 -0.137 -0.151 -0.273  0.553   0.365        
## stRsrv:SsnJ  0.145 -0.245 -0.187 -0.165 -0.294  0.355   0.535  0.727 
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## Model failed to converge with max|grad| = 0.0101821 (tol = 0.002, component 1)
Anova(glmd, type=3, method="chisq")
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: norga
##               Chisq Df Pr(>Chisq)    
## (Intercept)  5.5742  1    0.01823 *  
## site         8.0423  2    0.01793 *  
## Saison       5.0907  2    0.07844 .  
## site:Saison 63.0661  4  6.572e-13 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmd))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmd) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
## boundary (singular) fit: see help('isSingular')
##                 R2m       R2c
## delta     0.1779598 0.9271632
## lognormal 0.1785965 0.9304803
## trigamma  0.1772606 0.9235204
#trigamma la plus fiable

TEST - PAIRWISE

emtd1 <- lsmeans(glmd, ~ site, by="Saison")
pairs(emtd1)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.4757 0.315 Inf  -1.509  0.2865
##  (Bas-fond) - Reserve      -1.5333 0.541 Inf  -2.836  0.0127
##  Ext_Reserve - Reserve     -1.0576 0.464 Inf  -2.281  0.0584
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.5655 0.308 Inf  -1.838  0.1572
##  (Bas-fond) - Reserve      -0.4860 0.538 Inf  -0.903  0.6381
##  Ext_Reserve - Reserve      0.0795 0.465 Inf   0.171  0.9840
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.9236 0.315 Inf  -2.936  0.0093
##  (Bas-fond) - Reserve      -1.1917 0.543 Inf  -2.195  0.0720
##  Ext_Reserve - Reserve     -0.2681 0.462 Inf  -0.580  0.8308
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtd2 <- lsmeans(glmd, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtd2)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier  -0.2333 0.458 Inf  -0.510  0.8665
##  Aout - Juin     -0.1507 0.535 Inf  -0.281  0.9573
##  Fevrier - Juin   0.0826 0.195 Inf   0.424  0.9058
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Tester l’ajustement du modèle avec le plus faible AIC :

library(AICcmodavg)
## 
## Attaching package: 'AICcmodavg'
## The following objects are masked from 'package:MuMIn':
## 
##     AICc, DIC, importance
## The following object is masked from 'package:lme4':
## 
##     checkConv
#aictab(list(glm1, glm1f))

Floraison en facteur aléatoire La relation entre rspe et site peut varier selon la saison par contre

TEST - PAIRWISE

library(emmeans)
emtd1 <- lsmeans(glmd, ~ site, by="Saison")
pairs(emta1)
## Saison = Aout:
##  contrast                  estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  0.000004 0.154 Inf   0.000  1.0000
##  (Bas-fond) - Reserve      0.100089 0.158 Inf   0.632  0.8024
##  Ext_Reserve - Reserve     0.100085 0.158 Inf   0.632  0.8024
## 
## Saison = Fevrier:
##  contrast                  estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  0.394878 0.157 Inf   2.516  0.0319
##  (Bas-fond) - Reserve      0.195167 0.125 Inf   1.557  0.2645
##  Ext_Reserve - Reserve    -0.199711 0.162 Inf  -1.235  0.4327
## 
## Saison = Juin:
##  contrast                  estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve -0.483801 0.190 Inf  -2.553  0.0288
##  (Bas-fond) - Reserve     -0.412860 0.192 Inf  -2.148  0.0803
##  Ext_Reserve - Reserve     0.070941 0.169 Inf   0.421  0.9070
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtd2 <- lsmeans(glmd, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtd2)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier  -0.2333 0.458 Inf  -0.510  0.8665
##  Aout - Juin     -0.1507 0.535 Inf  -0.281  0.9573
##  Fevrier - Juin   0.0826 0.195 Inf   0.424  0.9058
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

###Analyses multivariées PCoA /Ok On veut montrer la différence de communauté entre saisons pour les Insectes en général, cf ensuite pour faire selon Ordre -> et voir si on fait aussi des PCo pour l’effet site ou on se contente de la Permanova

https://rpubs.com/hafezahmad/948799 ################################################################################

#Partie 1 : Saison Création des matrices Méthode Bray-Curtis -> vegdist + correction de hellinger -> wcmdscale, add lingoes ->adonis2, 5000 permutations

Filet

Piege

Tout

colmet<-c("#CDDC39","#000000")
ordiplot(pcoamet,display="sites",type="n")
points (pcoa, col = colmet[all$method], pch=18, cex=2)
legend("bottomright", legend=levels(all$method), pt.bg=colmet, pt.cex=1.2, y.intersp=.7,x.intersp=.7, pch = 21, cex=1)
title("PCoA.Method")

PCoA.Filet-Saison

PCoA.Piege-Saison

Permanova.Filet - Saison - Site

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_filet[, 6:406] ~ as.factor(m_filet$Saison) * as.factor(m_filet$site), data = m_filet, permutations = 5000)
##                                                   Df SumOfSqs      R2      F
## as.factor(m_filet$Saison)                          2   4.6062 0.26610 8.5177
## as.factor(m_filet$site)                            2   1.1923 0.06888 2.2047
## as.factor(m_filet$Saison):as.factor(m_filet$site)  4   2.3183 0.13393 2.1435
## Residual                                          34   9.1933 0.53110       
## Total                                             42  17.3100 1.00000       
##                                                      Pr(>F)    
## as.factor(m_filet$Saison)                         0.0002000 ***
## as.factor(m_filet$site)                           0.0003999 ***
## as.factor(m_filet$Saison):as.factor(m_filet$site) 0.0002000 ***
## Residual                                                       
## Total                                                          
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
pairwise.adonis <- function(resp,fact,p.method="fdr") {
if (nrow(resp)!=length(fact)) {
stop(paste("'",deparse(substitute(resp)),"' and '",deparse(substitute(fact)),
"lengths differ",sep=""))
}
if (!is.factor(fact)) {fact <- factor(fact)}
data.name <- paste(deparse(substitute(resp))," and ",deparse(substitute(fact)),sep="")
fun.p <- function(i,j) {
resp2 <- resp[as.numeric(fact)%in%c(i,j),]
fact2 <- droplevels(fact[as.numeric(fact)%in%c(i,j)])
adonis(resp2~fact2)$aov.tab[1,"Pr(>F)"]
}
multcomp <- pairwise.table(fun.p,levels(fact),p.adjust.method=p.method)
result <- list(method="permutational MANOVAs",data.name=data.name,p.value=multcomp,p.adjust.method=p.method)
class(result) <- "pairwise.htest"
return(result)
}

Pairwise permanova - Filet

pairwise.adonis (resp = m_filet[,6:406], fact = as.factor(m_filet$Saison), p.method="fdr")
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_filet[, 6:406] and as.factor(m_filet$Saison) 
## 
##         Aout  Fevrier
## Fevrier 0.001 -      
## Juin    0.001 0.001  
## 
## P value adjustment method: fdr

Permanova.Piege - Saison

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Blocks:  strata 
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piege[, 6:406] ~ as.factor(m_piege$Saison) * as.factor(m_piege$site), data = m_piege, permutations = 5000, strata = m_piege$site)
##                                                   Df SumOfSqs      R2      F
## as.factor(m_piege$Saison)                          2   2.4790 0.21318 3.8153
## as.factor(m_piege$site)                            2   1.2346 0.10618 1.9002
## as.factor(m_piege$Saison):as.factor(m_piege$site)  4   2.0670 0.17776 1.5907
## Residual                                          18   5.8476 0.50288       
## Total                                             26  11.6283 1.00000       
##                                                     Pr(>F)    
## as.factor(m_piege$Saison)                         0.000200 ***
## as.factor(m_piege$site)                           0.000200 ***
## as.factor(m_piege$Saison):as.factor(m_piege$site) 0.003599 ** 
## Residual                                                      
## Total                                                         
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Pairwise permanova - Piege

pairwise.adonis (resp = m_piege[,6:406], fact = as.factor(m_piege$Saison), p.method="fdr")
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_piege[, 6:406] and as.factor(m_piege$Saison) 
## 
##         Aout  Fevrier
## Fevrier 0.001 -      
## Juin    0.001 0.001  
## 
## P value adjustment method: fdr

#Partie 2 : Effet restauration

Création des matrices : PCoA Piege

Juin PCoA. Filet - Site // Piege - Site (vérifier si légendes sur les bons points)

Aout

Février

PERMANOVA. Filet - Aout

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_fileta[, 6:406] ~ as.factor(m_fileta$site), data = m_fileta, permutations = 5000)
##                          Df SumOfSqs      R2     F Pr(>F)    
## as.factor(m_fileta$site)  2   1.2696 0.25586 2.063  2e-04 ***
## Residual                 12   3.6927 0.74414                 
## Total                    14   4.9623 1.00000                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_fileta[, 6:406] and as.factor(m_fileta$site) 
## 
##             Bas-fond Ext_Reserve
## Ext_Reserve 0.077    -          
## Reserve     0.013    0.013      
## 
## P value adjustment method: fdr

PERMANOVA - Piege - Aout

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piegea[, 6:406] ~ as.factor(m_piegea$site), data = m_piegea, permutations = 5000)
##                          Df SumOfSqs      R2      F Pr(>F)   
## as.factor(m_piegea$site)  2   1.2524 0.36009 1.9696 0.0018 **
## Residual                  7   2.2256 0.63991                 
## Total                     9   3.4780 1.00000                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 'adonis' will be deprecated: use 'adonis2' instead
## Set of permutations < 'minperm'. Generating entire set.
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'adonis' will be deprecated: use 'adonis2' instead
## Set of permutations < 'minperm'. Generating entire set.
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_piegea[, 6:406] and as.factor(m_piegea$site) 
## 
##             Bas-fond Ext_Reserve
## Ext_Reserve 0.12     -          
## Reserve     0.12     0.12       
## 
## P value adjustment method: fdr

PERMANOVA - Filet - Février

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_filetf[, 6:406] ~ as.factor(m_filetf$site), data = m_filetf, permutations = 5000)
##                          Df SumOfSqs      R2      F Pr(>F)    
## as.factor(m_filetf$site)  2   1.4412 0.37264 2.9699  2e-04 ***
## Residual                 10   2.4264 0.62736                  
## Total                    12   3.8676 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_filetf[, 6:406] and as.factor(m_filetf$site) 
## 
##             Bas-fond Ext_Reserve
## Ext_Reserve 0.026    -          
## Reserve     0.026    0.104      
## 
## P value adjustment method: fdr

*PERMANOVA - Piege - Février

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piegef[, 6:406] ~ as.factor(m_piegef$site), data = m_piegef, permutations = 5000)
##                          Df SumOfSqs      R2     F Pr(>F)
## as.factor(m_piegef$site)  2   0.9014 0.32579 1.208 0.1218
## Residual                  5   1.8654 0.67421             
## Total                     7   2.7668 1.00000
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_piegef[, 6:406] and as.factor(m_piegef$site) 
## 
##             Bas-fond Ext_Reserve
## Ext_Reserve 0.15     -          
## Reserve     0.15     0.90       
## 
## P value adjustment method: fdr

PERMANOVA - Filet - Juin

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_filetj[, 6:406] ~ as.factor(m_filetj$site), data = m_filetj, permutations = 5000)
##                          Df SumOfSqs      R2      F   Pr(>F)   
## as.factor(m_filetj$site)  2   0.7997 0.20643 1.5608 0.006599 **
## Residual                 12   3.0742 0.79357                   
## Total                    14   3.8739 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 'adonis' will be deprecated: use 'adonis2' instead
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_filetj[, 6:406] and as.factor(m_filetj$site) 
## 
##             Bas-fond Ext_Reserve
## Ext_Reserve 0.117    -          
## Reserve     0.009    0.050      
## 
## P value adjustment method: fdr

PERMANOVA - Piege - Juin

## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piegej[, 6:406] ~ as.factor(m_piegej$site), data = m_piegej, permutations = 5000)
##                          Df SumOfSqs      R2      F   Pr(>F)   
## as.factor(m_piegej$site)  2   1.1479 0.39521 1.9604 0.003799 **
## Residual                  6   1.7566 0.60479                   
## Total                     8   2.9044 1.00000                   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 'adonis' will be deprecated: use 'adonis2' instead
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
## 
##  Pairwise comparisons using permutational MANOVAs 
## 
## data:  m_piegej[, 6:406] and as.factor(m_piegej$site) 
## 
##             Bas-fond Ext_Reserve
## Ext_Reserve 0.1      -          
## Reserve     0.1      0.1        
## 
## P value adjustment method: fdr

Peu de différences sur les PCoA mais significatif en Permanova ? Regarder si bonnes représentations avec deux axes, demander Magali

#Tableau de diversité & Classification

test<-read.csv("test.csv",header = T, row.names = NULL,sep = ";")
test2<-read.csv("test2.csv",header = T, row.names = NULL,sep = ";")

library(dplyr)
test0<-inner_join(test,test2,by="morphotype")

Abondances des espèces

fipia<-fipi[,(1:406)]
fipix<-fipia[,6:406]
fipiabu<-apply(fipix,2,sum)
fipiabu<-data.frame(fipiabu)
fipiabu$morphotype<-rownames(fipiabu)

Fusion

test0<-left_join(test0,fipiabu,by="morphotype")

#Informations

ggplot(synt) +
  aes(x = site, y = norga, fill = ordre) +
  geom_col() +
  scale_fill_manual(
    values = c(Autres = "#FFFFF0",
    Coleoptera = "#FF5722",
    Diptera = "#CDDC39",
    Hymenoptera = "#26A69A")
  ) +
  theme_dark() +
  facet_wrap(vars(Saison)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +ggtitle("Abondance-Tout")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))

fipinew$rspe<-apply(fipinew[,3:403],1,l)
fipinew$rspe
##  [1] 17 15 14 14  7 10 23 30 34 27 41 32 18 16 13 10  6  5 25 17 31 80 33 51  9
## [26] 14 10  4  5 11  9 11 15 21 29 29
ggplot(fipinew) +
  aes(x = site, y = rspe, fill = ordre) +
  geom_col() +
  scale_fill_manual(
    values = c(Autres = "#FFFFF0",
    Coleoptera = "#FF5722",
    Diptera = "#CDDC39",
    Hymenoptera = "#26A69A")
  ) +
  theme_dark() +
  facet_wrap(vars(saison)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +ggtitle("Richesse spécifique-Tout")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))

fipinewbis<-fipinew[,-(3:403)]

Au piège, rien d’intéressant mais au filet : halict 17, halict 1,2,3 sont présentes sur les trois saisons.

Chercher ces espèces avec data pièges

Espèces les plus abondantes

##         formic.8         formic.1         halict.3         mythic.3 
##              264              204              162              154 
##         rhinop.1         phlaeo.4         bracon.1         lepido.1 
##              113              101              100               97 
##         phorid.2         cicade.5        halict.17         muscid.1 
##               81               65               62               61 
##        formic.13         aphido.1         chloro.1         platyg.1 
##               50               46               42               36 
##         aleyro.1         formic.4         bracon.4         chryso.3 
##               35               34               31               27 
##         chloro.3         halict.2         phlaeo.1        bracon.13 
##               27               26               25               23 
##         euloph.4         eupelm.2         mirida.6         formic.3 
##               22               22               22               21 
##         meloid.2         phorid.4         chloro.5         bombyl.2 
##               20               20               18               18 
##        chrysol.2         crabro.4         mythic.5         chloro.2 
##               17               17               17               17 
##         chryso.4         platyg.2         cerato.6         phorid.3 
##               16               16               16               16 
##         milich.5         tachin.1         coccin.1        eupelm.12 
##               15               15               14               14 
##         cicade.3         phlaeo.6        crabro.13         bracon.7 
##               14               14               13               13 
##         euloph.5         euryto.1         mirida.2         curcul.1 
##               11               11               11               10 
##        chrysol.1        formic.14         formic.2         thynni.1 
##               10               10               10               10 
##         chloro.4         cerato.1         meloid.1         chalci.2 
##               10               10                9                9 
##         euloph.1         phlaeo.9         bupres.1         perila.1 
##                9                9                8                8 
##         crabro.3         bombyl.6         chloro.6         mythic.4 
##                8                8                8                8 
##         dermes.1         platyg.3         cecido.8         chloro.9 
##                7                7                7                7 
##         chiron.1         dolich.2         mythic.7         muscid.6 
##                7                7                7                7 
##         loncha.1         lepido.6         ptinid.1         mordel.1 
##                7                7                6                6 
##         coccin.5        euloph.14         ormyri.2         euloph.7 
##                6                6                6                6 
##         crabro.2         thynni.2         muscid.7         phorid.1 
##                6                6                6                6 
##         chryso.5         bupres.2         platyg.4         euryto.3 
##                5                5                5                5 
##        bracon.12         encyrt.4         euryto.2         tetrac.5 
##                5                5                5                5 
##         eupelm.4         bracon.8         eupelm.3         bracon.5 
##                5                5                5                5 
## pterom.1(platyg)         eupelm.1         formic.6         euloph.2 
##                5                5                5                5 
##         halict.1         cecido.6         mythic.8         drosop.4 
##                5                5                5                5 
##         muscid.3         sarcop.2         cicade.7         phlaeo.8 
##                5                5                5                5 
##         coniop.1         lepido.4         hemipt.2         cicade.1 
##                5                5                5                5 
##         staphy.3         dermes.3         meloid.3         coccin.3 
##                4                4                4                4 
##         dermes.2         curcul.2        bracon.14        euloph.12 
##                4                4                4                4 
##        eupelm.11         encyrt.3        crabro.14        pterom.10 
##                4                4                4                4 
##         megasp.1         coccin.2         loncha.2         muscid.4 
##                4                4                4                4 
##         cerato.7         crypto.1         muscid.5         muscid.2 
##                4                4                4                4 
##         psocop.4         lepido.7          acrid.1         coniop.2 
##                4                4                4                4 
##         coccin.6         dermes.4         coccin.4         liopte.1 
##                3                3                3                3 
##         signip.1        formic.19         tetrac.7        euloph.13 
##                3                3                3                3 
##        crabro.15         euloph.9         pterom.5         crabro.9 
##                3                3                3                3 
##         mutill.2         apidae.6         euloph.3         scolii.2 
##                3                3                3                3 
##         cecido.7         bombyl.5         apsilo.1         rhinii.2 
##                3                3                3                3 
##         milich.4         asilid.1         cecido.1         mythic.1 
##                3                3                3                3 
##         achili.1         phlaeo.5         lepido.3         tingid.1 
##                3                3                3                3 
##         lepido.2         mirida.1        chryso.13         chryso.6 
##                3                3                2                2 
##        chryso.12         carabi.4         coleop.2         pompil.5 
##                2                2                2                2 
##        formic.20        halict.19        eupelm.14        bethyl.10 
##                2                2                2                2 
##         thynni.5        halict.18        eupelm.13         pompil.3 
##                2                2                2                2 
##         perila.4        crabro.17         apheli.2         pterom.4 
##                2                2                2                2 
##         encyrt.9        encyrt.10         mymari.1         tricho.1 
##                2                2                2                2 
##         encyrt.5        eupelm.10         hymeno.8         encyrt.2 
##                2                2                2                2 
##         eupelm.8        crabro.10        bracon.11         apheli.1 
##                2                2                2                2 
##         eupelm.5         apidae.5         tetrac.3         hymeno.3 
##                2                2                2                2 
##         chalci.4        formic.15        formic.12        formic.11 
##                2                2                2                2 
##         formic.9         apidae.1         ichneu.1         scolii.1 
##                2                2                2                2 
##         chamae.1        chloro.11         chiron.3         tephri.4 
##                2                2                2                2 
##         chloro.8         odinii.1         anthom.1         rhinii.3 
##                2                2                2                2 
##        dipter.15         asilid.3         asilid.2        dipter.13 
##                2                2                2                2 
##         cerato.3         drosop.1         rhaphi.1         anthoc.1 
##                2                2                2                2 
##         lepido.5         neurop.2         cicade.4         cicade.2 
##                2                2                2                2 
##         aleyro.2         hemipt.1         leiodi.1         coccin.7 
##                2                2                1                1 
##         cerylo.1         nitidu.1         chryso.8         meloid.4 
##                1                1                1                1 
##         staphy.2         chryso.2         elater.1         lycida.1 
##                1                1                1                1 
##        crabro.21        formic.21        crabro.20        euloph.18 
##                1                1                1                1 
##         pterom.9         tetrac.8        encyrt.16         ichneu.3 
##                1                1                1                1 
##        crabro.18         pterom.8        bethyl.11        encyrt.15 
##                1                1                1                1 
##        encyrt.14         andren.1         dryini.1         pterom.7 
##                1                1                1                1 
##         ceraph.4         diapar.1        euloph.16         eutric.1 
##                1                1                1                1 
##         pompil.4         betyhl.7         scolii.3        encyrt.13 
##                1                1                1                1 
##        euloph.17         torymi.1         thynni.4        hymeno.12 
##                1                1                1                1 
##        euloph.15         pterom.6         tricho.2        encyrt.11 
##                1                1                1                1 
##         signip.2         apheli.4         psyllo.2          aphel.5 
##                1                1                1                1 
##         bethyl.9         bethyl.8        crabro.16         pompil.2 
##                1                1                1                1 
##        cleonym.1         encyrt.7         apheli.3         encyrt.8 
##                1                1                1                1 
##        euloph.11        euloph.10         euloph.8        formic.18 
##                1                1                1                1 
##         chalci.7         chaobo.1         encyrt.6         mutill.3 
##                1                1                1                1 
##        crabro.12         gaster.1         euloph.6         bethyl.5 
##                1                1                1                1 
##         crabro.8         encyrt.1         chalci.5        formic.17 
##                1                1                1                1 
##         ormyri.1        bracon.10         perila.2        thynnid.0 
##                1                1                1                1 
##         bracon.9         bracon.6         bethyl.4        halict.12 
##                1                1                1                1 
##         chalci.3         bethyl.3         chrysi.2        formic.10 
##                1                1                1                1 
##         bethyl.2         bethyl.1         formic.7         hymeno.1 
##                1                1                1                1 
##         chalci.1         chrysi.1         halict.4         halict.8 
##                1                1                1                1 
##         pompil.1         culici.2         drosop.5         tachin.3 
##                1                1                1                1 
##         asilid.4         ephydr.1         syrphi.2         syrphi.1 
##                1                1                1                1 
##         psycho.1         muscid.8        dipter.18         cerato.8 
##                1                1                1                1 
##         dolich.3         bombyl.7         aleyro.3         aphodi.1 
##                1                1                1                1 
##         lauxan.1         rhinii.4         chaobo.2         chiron.2 
##                1                1                1                1 
##        dipter.17         phorid.5         culici.1         ceraph.3 
##                1                1                1                1 
##         cecido.4         bombyl.4        milich.10        calliph.1 
##                1                1                1                1 
##         myceto.1         tephri.1         carnid.1         oestri.1 
##                1                1                1                1 
##         milich.8         ephydr.3         cecido.3         cecido.2 
##                1                1                1                1 
##         dolich.1         sarcop.3         sepsid.3         cerato.4 
##                1                1                1                1 
##         sarcop.1         milich.1         mythic.2         coreth.1 
##                1                1                1                1 
##         cicade.8         delpha.3         mirida.8         mirida.7 
##                1                1                1                1 
##         insect.5         kinnar.1        phlaeo.12        phlaeo.11 
##                1                1                1                1 
##         aphido.2         betida.1         cicade.6        phlaeo.10 
##                1                1                1                1 
##         psocop.3         beryti.1         delpha.2         delpha.1 
##                1                1                1                1 
##     sternoryncha         psocop.2         phlaeo.7         insect.3 
##                1                1                1                1 
##         cicado.1         nevrop.1         phlaeo.3         meloid.7 
##                1                1                1                0 
##         meloid.6         meloid.5         chryso.7       bethyl.5.1 
##                0                0                0                0 
##        heterog.1        formic.16         bombyl.9         ulidii.1 
##                0                0                0                0 
##         insect.4 
##                0

Tableau

test0
##           morphotype           famille         ordre          superfam fipiabu
## 1           leiodi.1         Leiodidae    Coleoptera    Staphylinoidea       1
## 2           culici.2         Culicidae       Diptera        Culicoidea       1
## 3          crabro.21       Crabronidae   Hymenoptera           Apoidea       1
## 4          formic.21        Formicidae   Hymenoptera       Formicoidea       1
## 5          crabro.20       Crabronidae   Hymenoptera           Apoidea       1
## 6           pompil.5        Pompilidae   Hymenoptera       Pompiloidea       2
## 7           bombyl.9        Bombylidae       Diptera         Asiloidea       0
## 8           chamae.1     Chamaemyiidae       Diptera      Lauxanioidea       2
## 9          euloph.18        Eulophidae   Hymenoptera      Chalcidoidea       1
## 10         formic.20        Formicidae   Hymenoptera       Formicoidea       2
## 11          coccin.7      Coccinelidae    Coleoptera        Cucujoidea       1
## 12          cicade.8      Cicadellidae     Hemiptera      Membracoidea       1
## 13         chloro.11       Chloropidae       Diptera         Carnoidea       2
## 14         bracon.14        Braconidae   Hymenoptera    Ichneumonoidea       4
## 15          delpha.3       Delphacidae     Hemiptera       Fulgoroidea       1
## 16          mirida.8           Miridae     Hemiptera        Lygaeoidea       1
## 17          mirida.7           Miridae     Hemiptera        Lygaeoidea       1
## 18          drosop.5     Drosophilidae       Diptera       Ephydroidea       1
## 19          pterom.9      Pteromalidae   Hymenoptera      Chalcidoidea       1
## 20          tachin.3        Tachinidae       Diptera        Oestroidea       1
## 21          tetrac.8     Tetracampidae   Hymenoptera      Chalcidoidea       1
## 22         encyrt.16        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 23          ichneu.3     Ichneumonidae   Hymenoptera    Ichneumonoidea       1
## 24          rhaphi.1  Rhaphidophoridae    Orthoptera Rhaphidophoroidea       2
## 25          asilid.4          Asilidae       Diptera         Asiloidea       1
## 26          cicade.7      Cicadellidae     Hemiptera      Membracoidea       5
## 27         crabro.18       Crabronidae   Hymenoptera           Apoidea       1
## 28          pterom.8      Pteromalidae   Hymenoptera      Chalcidoidea       1
## 29         chryso.13     Chrysomelidae    Coleoptera    Chrysomeloidea       2
## 30          ephydr.1       Ephrydridae       Diptera       Ephydroidea       1
## 31          syrphi.2         Syrphidae       Diptera        Syrphoidea       1
## 32          insect.5                         Insecta                         1
## 33          psocop.4                      Psocoptera                         4
## 34          ptinid.1          Ptinidae    Coleoptera     Bostrichoidea       6
## 35         halict.19        Halictidae   Hymenoptera           Apoidea       2
## 36          anthoc.1      Anthocoridae     Hemiptera        Cimicoidea       2
## 37          kinnar.1        Kinnaridae     Hemiptera       Fulgoroidea       1
## 38          liopte.1       Liopteridae   Hymenoptera                         3
## 39          syrphi.1         Syrphidae       Diptera        Syrphoidea       1
## 40         bethyl.11        Bethylidae   Hymenoptera      Chrysidoidea       1
## 41         encyrt.15        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 42         encyrt.14        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 43         phlaeo.12    Phlaeotripidae  Thysanoptera        Tubulifera       1
## 44         phlaeo.11    Phlaeotripidae  Thysanoptera        Tubulifera       1
## 45          aphido.2        Aphidoidae     Hemiptera        Aphidoidea       1
## 46          psycho.1       Psychodidae       Diptera      Psychodoidea       1
## 47          chryso.6     Chrysomelidae    Coleoptera    Chrysomeloidea       2
## 48          lepido.7                     Lepidoptera                         4
## 49         eupelm.14        Eupelmidae   Hymenoptera      Chalcidoidea       2
## 50          muscid.8          Muscidae       Diptera         Muscoidea       1
## 51          loncha.2       Lonchaeidae       Diptera      Lonchaeoidea       4
## 52          muscid.7          Muscidae       Diptera         Muscoidea       6
## 53           acrid.1         Acrididae    Orthoptera        Acridoidea       4
## 54          staphy.3     Staphylinidae    Coleoptera    Staphylinoidea       4
## 55          andren.1        Andrenidae   Hymenoptera           Apoidea       1
## 56          dryini.1       Dryinididae   Hymenoptera      Chrysidoidea       1
## 57         dipter.18                         Diptera                         1
## 58          cerato.8   Ceratopogonidae       Diptera     Chironomoidea       1
## 59          dolich.3    Dolichopodidae       Diptera        Empidoidea       1
## 60         bethyl.10        Bethylidae   Hymenoptera      Chrysidoidea       2
## 61          bombyl.7        Bombylidae       Diptera         Asiloidea       1
## 62          coccin.6      Coccinelidae    Coleoptera        Cucujoidea       3
## 63          chiron.3      Chironomidae       Diptera     Chironomoidea       2
## 64          cecido.8     Cecidomyiidae       Diptera        Sciaroidea       7
## 65          cecido.7     Cecidomyiidae       Diptera        Sciaroidea       3
## 66          aleyro.3     Aleyroionidae     Hemiptera      Aleyrodoidea       1
## 67          bombyl.6        Bombylidae       Diptera         Asiloidea       8
## 68          betida.1          Baetidae Ephemeroptera         Baetoidea       1
## 69          pterom.7      Pteromalidae   Hymenoptera      Chalcidoidea       1
## 70         chrysol.2    Chrysolampidae   Hymenoptera      Chalcidoidea      17
## 71          cerylo.1       Cerylonidae    Coleoptera        Cucujoidea       1
## 72          aphodi.1        Aphodiidae    Coleoptera     Scarabaeoidea       1
## 73          chloro.9       Chloropidae       Diptera         Carnoidea       7
## 74          ceraph.4     Ceraphronidae   Hymenoptera    Ceraphronoidea       1
## 75          cecido.6     Cecidomyiidae       Diptera        Sciaroidea       5
## 76          diapar.1        Diapriidae   Hymenoptera       Diaprioidea       1
## 77          lauxan.1       Lauxaniidae       Diptera      Lauxanioidea       1
## 78          thynni.5         Thynnidae   Hymenoptera        Thynnoidea       2
## 79          rhinop.1     Rhinophoridae       Diptera        Oestroidea     113
## 80          muscid.4          Muscidae       Diptera         Muscoidea       4
## 81          achili.1         Achilidae     Hemiptera       Fulgoroidea       3
## 82          rhinii.4         Rhiniidae       Diptera        Oestroidea       1
## 83          bombyl.5        Bombylidae       Diptera         Asiloidea       3
## 84          chaobo.2       Chaoboridae       Diptera        Culicoidea       1
## 85         euloph.16        Eulophidae   Hymenoptera      Chalcidoidea       1
## 86          eutric.1 Eutrichosomatidae   Hymenoptera      Chalcidoidea       1
## 87          cicade.6      Cicadellidae     Hemiptera      Membracoidea       1
## 88          chiron.2      Chironomidae       Diptera     Chironomoidea       1
## 89          apsilo.1  Apsilocephalidae       Diptera         Asiloidea       3
## 90          pompil.4        Pompilidae   Hymenoptera       Pompiloidea       1
## 91         phlaeo.10    Phlaeotripidae  Thysanoptera        Tubulifera       1
## 92          lepido.6                     Lepidoptera                         7
## 93         dipter.17                         Diptera                         1
## 94          chiron.1      Chironomidae       Diptera     Chironomoidea       7
## 95          phorid.5          Phoridae       Diptera     Platypezoidea       1
## 96          psocop.3                      Psocoptera                         1
## 97          culici.1         Culicidae       Diptera        Culicoidea       1
## 98          lepido.5                     Lepidoptera                         2
## 99         halict.18        Halictidae   Hymenoptera           Apoidea       2
## 100         ceraph.3     Ceraphronidae   Hymenoptera    Ceraphronoidea       1
## 101         dolich.2    Dolichopodidae       Diptera        Empidoidea       7
## 102         betyhl.7        Bethylidae   Hymenoptera      Chrysidoidea       1
## 103         scolii.3         Scoliidae   Hymenoptera         Vespoidea       1
## 104        encyrt.13        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 105         dermes.4       Dermestidae    Coleoptera     Bostrichoidea       3
## 106        euloph.17        Eulophidae   Hymenoptera      Chalcidoidea       1
## 107        bracon.13        Braconidae   Hymenoptera    Ichneumonoidea      23
## 108         torymi.1         Torymidae   Hymenoptera      Chalcidoidea       1
## 109         thynni.4         Thynnidae   Hymenoptera        Thynnoidea       1
## 110        chrysol.1    Chrysolampidae   Hymenoptera      Chalcidoidea      10
## 111        hymeno.12                     Hymenoptera                         1
## 112        euloph.15        Eulophidae   Hymenoptera      Chalcidoidea       1
## 113         pterom.6      Pteromalidae   Hymenoptera      Chalcidoidea       1
## 114         tricho.2 Trichogrammatidae   Hymenoptera      Chalcidoidea       1
## 115        encyrt.11        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 116        euloph.14        Eulophidae   Hymenoptera      Chalcidoidea       6
## 117        eupelm.12        Eupelmidae   Hymenoptera      Chalcidoidea      14
## 118         tephri.4       Tephritidae       Diptera      Tephritoidea       2
## 119         signip.2     Signiphoridae   Hymenoptera      Chalcidoidea       1
## 120         signip.1     Signiphoridae   Hymenoptera      Chalcidoidea       3
## 121         apheli.4       Aphelinidae   Hymenoptera      Chalcidoidea       1
## 122        formic.19        Formicidae   Hymenoptera       Formicoidea       3
## 123         psyllo.2                       Hemiptera                         1
## 124        eupelm.13        Eupelmidae   Hymenoptera      Chalcidoidea       2
## 125         cecido.4     Cecidomyiidae       Diptera        Sciaroidea       1
## 126         coniop.2   Coniopterigydae    Neuroptera  Coniopterygoidea       4
## 127          aphel.5       Aphelinidae   Hymenoptera      Chalcidoidea       1
## 128         tetrac.7     Tetracampidae   Hymenoptera      Chalcidoidea       3
## 129         bombyl.4        Bombylidae       Diptera         Asiloidea       1
## 130        euloph.13        Eulophidae   Hymenoptera      Chalcidoidea       3
## 131         platyg.4    Platygastridae   Hymenoptera   Platygastroidea       5
## 132         bethyl.9        Bethylidae   Hymenoptera      Chrysidoidea       1
## 133         bethyl.8        Bethylidae   Hymenoptera      Chrysidoidea       1
## 134        milich.10       Milichiidae       Diptera         Carnoidea       1
## 135        crabro.16       Crabronidae   Hymenoptera           Apoidea       1
## 136        crabro.15       Crabronidae   Hymenoptera           Apoidea       3
## 137         pompil.3        Pompilidae   Hymenoptera       Pompiloidea       2
## 138         pompil.2        Pompilidae   Hymenoptera       Pompiloidea       1
## 139        calliph.1     Calliphoridae       Diptera        Oestroidea       1
## 140        cleonym.1       Cleonymidae   Hymenoptera      Chalcidoidea       1
## 141         perila.4      Perilampidae   Hymenoptera      Chalcidoidea       2
## 142        crabro.17       Crabronidae   Hymenoptera           Apoidea       2
## 143         beryti.1         Berytidae     Hemiptera        Lygaeoidea       1
## 144         encyrt.7        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 145         apheli.3       Aphelinidae   Hymenoptera      Chalcidoidea       1
## 146         apheli.2       Aphelinidae   Hymenoptera      Chalcidoidea       2
## 147         myceto.1    Mycetophilidae       Diptera        Sciaroidea       1
## 148         encyrt.8        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 149         cerato.7   Ceratopogonidae       Diptera     Chironomoidea       4
## 150        euloph.12        Eulophidae   Hymenoptera      Chalcidoidea       4
## 151        euloph.11        Eulophidae   Hymenoptera      Chalcidoidea       1
## 152        euloph.10        Eulophidae   Hymenoptera      Chalcidoidea       1
## 153         pterom.4      Pteromalidae   Hymenoptera      Chalcidoidea       2
## 154         euloph.9        Eulophidae   Hymenoptera      Chalcidoidea       3
## 155         euloph.8        Eulophidae   Hymenoptera      Chalcidoidea       1
## 156         cerato.6   Ceratopogonidae       Diptera     Chironomoidea      16
## 157         tephri.1       Tephritidae       Diptera      Tephritoidea       1
## 158         euryto.3       Eurytomidae   Hymenoptera      Chalcidoidea       5
## 159         encyrt.9        Encyrtidae   Hymenoptera      Chalcidoidea       2
## 160         nitidu.1       Nitidulidae    Coleoptera        Cucujoidea       1
## 161        encyrt.10        Encyrtidae   Hymenoptera      Chalcidoidea       2
## 162         platyg.3    Platygastridae   Hymenoptera   Platygastroidea       7
## 163         mythic.8    Mythicomyiidae       Diptera         Asiloidea       5
## 164         mythic.7    Mythicomyiidae       Diptera         Asiloidea       7
## 165        formic.18        Formicidae   Hymenoptera       Formicoidea       1
## 166         carnid.1          Carnidae       Diptera         Carnoidea       1
## 167         chalci.7       Chalcididae   Hymenoptera      Chalcidoidea       1
## 168         mymari.1         Mymaridae   Hymenoptera      Chalcidoidea       2
## 169         tricho.1 Trichogrammatidae   Hymenoptera      Chalcidoidea       2
## 170         phlaeo.8    Phlaeotripidae  Thysanoptera        Tubulifera       5
## 171         phlaeo.9    Phlaeotripidae  Thysanoptera        Tubulifera       9
## 172        eupelm.11        Eupelmidae   Hymenoptera      Chalcidoidea       4
## 173         chaobo.1       Chaoboridae       Diptera        Culicoidea       1
## 174         pterom.5      Pteromalidae   Hymenoptera      Chalcidoidea       3
## 175        bracon.12        Braconidae   Hymenoptera    Ichneumonoidea       5
## 176         encyrt.6        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 177         encyrt.5        Encyrtidae   Hymenoptera      Chalcidoidea       2
## 178         encyrt.3        Encyrtidae   Hymenoptera      Chalcidoidea       4
## 179         encyrt.4        Encyrtidae   Hymenoptera      Chalcidoidea       5
## 180         ormyri.2         Ormyridae   Hymenoptera      Chalcidoidea       6
## 181         euloph.7        Eulophidae   Hymenoptera      Chalcidoidea       6
## 182         crypto.1    Cryptochetidae       Diptera      Lonchaeoidea       4
## 183         euryto.2       Eurytomidae   Hymenoptera      Chalcidoidea       5
## 184         oestri.1         Oestridae       Diptera         Oestridae       1
## 185         coniop.1   Coniopterigydae    Neuroptera  Coniopterygoidea       5
## 186         mutill.3        Mutillidae   Hymenoptera       Pompiloidea       1
## 187        crabro.14       Crabronidae   Hymenoptera           Apoidea       4
## 188        crabro.13       Crabronidae   Hymenoptera           Apoidea      13
## 189         dermes.3       Dermestidae    Coleoptera     Bostrichoidea       4
## 190         milich.8       Milichiidae       Diptera         Carnoidea       1
## 191         neurop.2       Chrysopidae    Neuroptera      Chrysopoidea       2
## 192         ephydr.3       Ephrydridae       Diptera       Ephydroidea       1
## 193         mirida.6           Miridae     Hemiptera        Lygaeoidea      22
## 194         cicade.5      Cicadellidae     Hemiptera      Membracoidea      65
## 195        crabro.12       Crabronidae   Hymenoptera           Apoidea       1
## 196        chryso.12     Chrysomelidae    Coleoptera    Chrysomeloidea       2
## 197         chloro.8       Chloropidae       Diptera         Carnoidea       2
## 198        eupelm.10        Eupelmidae   Hymenoptera      Chalcidoidea       2
## 199         muscid.6          Muscidae       Diptera         Muscoidea       7
## 200         muscid.5          Muscidae       Diptera         Muscoidea       4
## 201         odinii.1         Odiniidae       Diptera       Opomyzoidea       2
## 202         hymeno.8                     Hymenoptera                         2
## 203         platyg.2    Platygastridae   Hymenoptera   Platygastroidea      16
## 204         gaster.1    Gasteruptiidae   Hymenoptera        Evanioidea       1
## 205         delpha.2       Delphacidae     Hemiptera       Fulgoroidea       1
## 206         cicade.4      Cicadellidae     Hemiptera      Membracoidea       2
## 207         mordel.1       Mordellidae    Coleoptera    Tenebrionoidea       6
## 208         delpha.1       Delphacidae     Hemiptera       Fulgoroidea       1
## 209         encyrt.2        Encyrtidae   Hymenoptera      Chalcidoidea       2
## 210         loncha.1       Lonchaeidae       Diptera      Lonchaeoidea       7
## 211         anthom.1      Anthomyiidae       Diptera         Muscoidea       2
## 212         eupelm.8        Eupelmidae   Hymenoptera      Chalcidoidea       2
## 213         aphido.1        Aphidoidae     Hemiptera        Aphidoidea      46
## 214         lepido.4                     Lepidoptera                         5
## 215         cicade.3      Cicadellidae     Hemiptera      Membracoidea      14
## 216         chloro.6       Chloropidae       Diptera         Carnoidea       8
## 217         rhinii.3         Rhiniidae       Diptera        Oestroidea       2
## 218         rhinii.2         Rhiniidae       Diptera        Oestroidea       3
## 219         platyg.1    Platygastridae   Hymenoptera   Platygastroidea      36
## 220         euloph.6        Eulophidae   Hymenoptera      Chalcidoidea       1
## 221        crabro.10       Crabronidae   Hymenoptera           Apoidea       2
## 222         bethyl.5        Bethylidae   Hymenoptera      Chrysidoidea       1
## 223         chloro.5       Chloropidae       Diptera         Carnoidea      18
## 224         crabro.9       Crabronidae   Hymenoptera           Apoidea       3
## 225         drosop.4     drosophilidae       Diptera       Ephydroidea       5
## 226         crabro.8       Crabronidae   Hymenoptera           Apoidea       1
## 227         muscid.3          Muscidae       Diptera         Muscoidea       5
## 228         encyrt.1        Encyrtidae   Hymenoptera      Chalcidoidea       1
## 229         cecido.3     Cecidomyiidae       Diptera        Sciaroidea       1
## 230         cicade.2      Cicadellidae     Hemiptera      Membracoidea       2
## 231        bracon.11        Braconidae   Hymenoptera    Ichneumonoidea       2
## 232         apheli.1       Aphelinidae   Hymenoptera      Chalcidoidea       2
## 233     sternoryncha                       Hemiptera                         1
## 234         aleyro.2       Aleyrodidae     Hemiptera      Aleyrodoidea       2
## 235         mythic.5    Mythicomyiidae       Diptera         Asiloidea      17
## 236         chalci.5       Chalcididae   Hymenoptera      Chalcidoidea       1
## 237         coccin.5      Coccinelidae    Coleoptera        Cucujoidea       6
## 238         psocop.2                      Psocoptera                         1
## 239        formic.17        Formicidae   Hymenoptera       Formicoidea       1
## 240         chryso.8     Chrysomelidae    Coleoptera    Chrysomeloidea       1
## 241        dipter.15                         Diptera                         2
## 242         ormyri.1         Ormyridae   Hymenoptera      Chalcidoidea       1
## 243         milich.5       Milichiidae       Diptera         Carnoidea      15
## 244         cecido.2     Cecidomyiidae       Diptera        Sciaroidea       1
## 245         phlaeo.7    Phlaeotripidae  Thysanoptera        Tubulifera       1
## 246         meloid.7          Meloidae    Coleoptera    Tenebrionoidea       0
## 247         meloid.6          Meloidae    Coleoptera    Tenebrionoidea       0
## 248         meloid.5          Meloidae    Coleoptera    Tenebrionoidea       0
## 249         chryso.7     Chrysomelidae    Coleoptera    Chrysomeloidea       0
## 250         meloid.4          Meloidae    Coleoptera    Tenebrionoidea       1
## 251         bethyl.5        Bethylidae   Hymenoptera      Chrysidoidea       1
## 252         tetrac.5     Tetracampidae   Hymenoptera      Chalcidoidea       5
## 253         eupelm.5        Eupelmidae   Hymenoptera      Chalcidoidea       2
## 254         mutill.2        Mutillidae   Hymenoptera       Pompiloidea       3
## 255        heterog.1    Heterogynaidae   Hymenoptera           Apoidea       0
## 256         insect.4                       Hemiptera                         0
## 257        bracon.10        Braconidae   Hymenoptera    Ichneumonoidea       1
## 258         asilid.3          Asilidae       Diptera         Asiloidea       2
## 259         insect.3                       Hemiptera                         1
## 260         carabi.4         Carabidae    Coleoptera        Caraboidea       2
## 261         hemipt.2                       Hemiptera                         5
## 262         dolich.1    Dolichopodidae       Diptera        Empidoidea       1
## 263         hemipt.1                       Hemiptera                         2
## 264         cicado.1                       Hemiptera                         1
## 265        halict.17        Halictidae   Hymenoptera           Apoidea      62
## 266         asilid.2          Asilidae       Diptera         Asiloidea       2
## 267         phlaeo.6    Phlaeotripidae  Thysanoptera        Tubulifera      14
## 268         coleop.2                      Coleoptera                         2
## 269         perila.2      Perilampidae   Hymenoptera      Chalcidoidea       1
## 270         eupelm.4        Eupelmidae   Hymenoptera      Chalcidoidea       5
## 271         apidae.5            Apidae   Hymenoptera           Apoidea       2
## 272        thynnid.0         Thynnidae   Hymenoptera        Thynnoidea       1
## 273         bracon.9        Braconidae   Hymenoptera    Ichneumonoidea       1
## 274         euloph.5        Eulophidae   Hymenoptera      Chalcidoidea      11
## 275         staphy.2     Staphylinidae    Coleoptera    Staphylinoidea       1
## 276         bracon.8        Braconidae   Hymenoptera    Ichneumonoidea       5
## 277         phlaeo.5    Phlaeotripidae  Thysanoptera        Tubulifera       3
## 278         euryto.1       Eurytomidae   Hymenoptera      Chalcidoidea      11
## 279         eupelm.3        Eupelmidae   Hymenoptera      Chalcidoidea       5
## 280         meloid.3          Meloidae    Coleoptera    Tenebrionoidea       4
## 281         milich.4       Milichiidae       Diptera         Carnoidea       3
## 282         sarcop.3     Sarcophagidae       Diptera        Oestroidea       1
## 283         sepsid.3          Sepsidae       Diptera      Sciomyzoidea       1
## 284         cerato.4   Ceratopogonidae       Diptera     Chironomoidea       1
## 285         lepido.3                     Lepidoptera                         3
## 286         nevrop.1   Coniopterigydae    Neuroptera  Coniopterygoidea       1
## 287         chloro.4       Chloropidae       Diptera         Carnoidea      10
## 288         bracon.7        Braconidae   Hymenoptera    Ichneumonoidea      13
## 289         coccin.4      Coccinelidae    Coleoptera        Cucujoidea       3
## 290         aleyro.1       Aleyrodidae     Hemiptera      Aleyrodoidea      35
## 291         bracon.6        Braconidae   Hymenoptera    Ichneumonoidea       1
## 292         bethyl.4        Bethylidae   Hymenoptera      Chrysidoidea       1
## 293         tetrac.3     Tetracampidae   Hymenoptera      Chalcidoidea       2
## 294         asilid.1          Asilidae       Diptera         Asiloidea       3
## 295         sarcop.2     Sarcophagidae       Diptera        Oestroidea       5
## 296        formic.16        Formicidae   Hymenoptera       Formicoidea       0
## 297         hymeno.3                     Hymenoptera                         2
## 298         chalci.4       Chalcididae   Hymenoptera      Chalcidoidea       2
## 299         sarcop.1     Sarcophagidae       Diptera        Oestroidea       1
## 300        formic.15        Formicidae   Hymenoptera       Formicoidea       2
## 301         bracon.5        Braconidae   Hymenoptera    Ichneumonoidea       5
## 302         ulidii.1         Ulidiidae       Diptera      Tephritoidea       0
## 303        halict.12        Halictidae   Hymenoptera           Apoidea       1
## 304        dipter.13                         Diptera                         2
## 305        formic.14        Formicidae   Hymenoptera       Formicoidea      10
## 306         apidae.6            Apidae   Hymenoptera           Apoidea       3
## 307         cerato.3   Ceratopogonidae       Diptera     Chironomoidea       2
## 308         chalci.3       Chalcididae   Hymenoptera      Chalcidoidea       1
## 309         euloph.4        Eulophidae   Hymenoptera      Chalcidoidea      22
## 310        pterom.10      Pteromalidae   Hymenoptera      Chalcidoidea       4
## 311         cecido.1     Cecidomyiidae       Diptera        Sciaroidea       3
## 312         milich.1       Milichiidae       Diptera         Carnoidea       1
## 313        formic.13        Formicidae   Hymenoptera       Formicoidea      50
## 314         bethyl.3        Bethylidae   Hymenoptera      Chrysidoidea       1
## 315         cerato.1   Ceratopogonidae       Diptera     Chironomoidea      10
## 316         chryso.5     Chrysomelidae    Coleoptera    Chrysomeloidea       5
## 317         chalci.2       Chalcididae   Hymenoptera      Chalcidoidea       9
## 318         chryso.4     Chrysomelidae    Coleoptera    Chrysomeloidea      16
## 319         euloph.3        Eulophidae   Hymenoptera      Chalcidoidea       3
## 320         coccin.3      Coccinelidae    Coleoptera        Cucujoidea       4
## 321         eupelm.2        Eupelmidae   Hymenoptera      Chalcidoidea      22
## 322         dermes.2       Dermestidae    Coleoptera     Bostrichoidea       4
## 323         chryso.3     Chrysomelidae    Coleoptera    Chrysomeloidea      27
## 324         chrysi.2       Chrysididae   Hymenoptera      Chrysidoidea       1
## 325         formic.8        Formicidae   Hymenoptera       Formicoidea     264
## 326         bupres.2       Buprestidae    Coleoptera      Buprestoidea       5
## 327        formic.12        Formicidae   Hymenoptera       Formicoidea       2
## 328        formic.11        Formicidae   Hymenoptera       Formicoidea       2
## 329        formic.10        Formicidae   Hymenoptera       Formicoidea       1
## 330         tachin.1        Tachinidae       Diptera        Oestroidea      15
## 331         mythic.3    Mythicomyiidae       Diptera         Asiloidea     154
## 332         phorid.4          Phoridae       Diptera     Platypezoidea      20
## 333         phorid.3          Phoridae       Diptera     Platypezoidea      16
## 334         perila.1      Perilampidae   Hymenoptera      Chalcidoidea       8
## 335         megasp.1      Megaspilidae   Hymenoptera    Ceraphronoidea       4
## 336         phorid.2          Phoridae       Diptera     Platypezoidea      81
## 337         mythic.2    Mythicomyiidae       Diptera         Asiloidea       1
## 338         tingid.1          Tingidae     Hemiptera          Miroidea       3
## 339         chloro.3       Chloropidae       Diptera         Carnoidea      27
## 340 pterom.1(platyg)      Pteromalidae   Hymenoptera      Chalcidoidea       5
## 341         coreth.1    Corethrellidae       Diptera        Culicoidea       1
## 342         muscid.2          Muscidae       Diptera         Muscoidea       4
## 343         bracon.4        Braconidae   Hymenoptera    Ichneumonoidea      31
## 344         lepido.2                     Lepidoptera                         3
## 345         bethyl.2        Bethylidae   Hymenoptera      Chrysidoidea       1
## 346         formic.9        Formicidae   Hymenoptera       Formicoidea       2
## 347         bethyl.1        Bethylidae   Hymenoptera      Chrysidoidea       1
## 348         eupelm.1        Eupelmidae   Hymenoptera      Chalcidoidea       5
## 349         formic.7        Formicidae   Hymenoptera       Formicoidea       1
## 350         lepido.1                     Lepidoptera                        97
## 351         phorid.1          Phoridae       Diptera     Platypezoidea       6
## 352         mythic.1    Mythicomyiidae       Diptera         Asiloidea       3
## 353         mythic.4    Mythicomyiidae       Diptera         Asiloidea       8
## 354         cicade.1      Cicadellidae     Hemiptera      Membracoidea       5
## 355         bombyl.2        Bombylidae       Diptera         Asiloidea      18
## 356         formic.6        Formicidae   Hymenoptera       Formicoidea       5
## 357         coccin.1      Coccinelidae    Coleoptera        Cucujoidea      14
## 358         coccin.2      Coccinelidae    Coleoptera        Cucujoidea       4
## 359         chloro.1       Chloropidae       Diptera         Carnoidea      42
## 360         chloro.2       Chloropidae       Diptera         Carnoidea      17
## 361         formic.3        Formicidae   Hymenoptera       Formicoidea      21
## 362         bupres.1       Buprestidae    Coleoptera      Buprestoidea       8
## 363         chryso.2     Chrysomelidae    Coleoptera    Chrysomeloidea       1
## 364         curcul.1     Curculionidae    Coleoptera    Curculionoidea      10
## 365         curcul.2     Curculionidae    Coleoptera    Curculionoidea       4
## 366         dermes.1       Dermestidae    Coleoptera     Bostrichoidea       7
## 367         elater.1        Elateridae    Coleoptera       Elateroidea       1
## 368         hymeno.1                     Hymenoptera                         1
## 369         lycida.1           Lycidae    Coleoptera      Cantharoidea       1
## 370         muscid.1          Muscidae       Diptera         Muscoidea      61
## 371         meloid.1          Meloidae    Coleoptera    Tenebrionoidea       9
## 372         meloid.2          Meloidae    Coleoptera    Tenebrionoidea      20
## 373         drosop.1     Drosophilidae       Diptera       Ephydroidea       2
## 374         mirida.2           Miridae     Hemiptera        Lygaeoidea      11
## 375         mirida.1           Miridae     Hemiptera        Lygaeoidea       3
## 376         apidae.1            Apidae   Hymenoptera           Apoidea       2
## 377         bracon.1        Braconidae   Hymenoptera    Ichneumonoidea     100
## 378         chalci.1       Chalcididae   Hymenoptera      Chalcidoidea       1
## 379         chrysi.1       Chrysididae   Hymenoptera      Chrysidoidea       1
## 380         crabro.2       Crabronidae   Hymenoptera           Apoidea       6
## 381         crabro.3       Crabronidae   Hymenoptera           Apoidea       8
## 382         crabro.4       Crabronidae   Hymenoptera           Apoidea      17
## 383         euloph.2        Eulophidae   Hymenoptera      Chalcidoidea       5
## 384         euloph.1        Eulophidae   Hymenoptera      Chalcidoidea       9
## 385         formic.1        Formicidae   Hymenoptera       Formicoidea     204
## 386         formic.2        Formicidae   Hymenoptera       Formicoidea      10
## 387         formic.4        Formicidae   Hymenoptera       Formicoidea      34
## 388         halict.1        Halictidae   Hymenoptera           Apoidea       5
## 389         halict.2        Halictidae   Hymenoptera           Apoidea      26
## 390         halict.3        Halictidae   Hymenoptera           Apoidea     162
## 391         halict.4        Halictidae   Hymenoptera           Apoidea       1
## 392         halict.8        Halictidae   Hymenoptera           Apoidea       1
## 393         ichneu.1   Ichneumonididae   Hymenoptera    Ichneumonoidea       2
## 394         pompil.1        Pompilidae   Hymenoptera       Pompiloidea       1
## 395         scolii.1         Scoliidae   Hymenoptera         Vespoidea       2
## 396         scolii.2         Scoliidae   Hymenoptera         Vespoidea       3
## 397         thynni.1         Thynnidae   Hymenoptera        Thynnoidea      10
## 398         thynni.2         Thynnidae   Hymenoptera        Thynnoidea       6
## 399         phlaeo.1    Phlaeotripidae  Thysanoptera        Tubulifera      25
## 400         phlaeo.3    Phlaeotripidae  Thysanoptera        Tubulifera       1
## 401         phlaeo.4    Phlaeotripidae  Thysanoptera        Tubulifera     101
test0bis<-subset(test0,test0$fipiabu != 0)
unique(test0$morphotype[test0$superfam=="Tephritoidea"])
## [1] "tephri.4" "tephri.1" "ulidii.1"
unique(test0bis$morphotype[test0bis$ordre=="Diptera"])
##   [1] "culici.2"  "chamae.1"  "chloro.11" "drosop.5"  "tachin.3"  "asilid.4" 
##   [7] "ephydr.1"  "syrphi.2"  "syrphi.1"  "psycho.1"  "muscid.8"  "loncha.2" 
##  [13] "muscid.7"  "dipter.18" "cerato.8"  "dolich.3"  "bombyl.7"  "chiron.3" 
##  [19] "cecido.8"  "cecido.7"  "bombyl.6"  "chloro.9"  "cecido.6"  "lauxan.1" 
##  [25] "rhinop.1"  "muscid.4"  "rhinii.4"  "bombyl.5"  "chaobo.2"  "chiron.2" 
##  [31] "apsilo.1"  "dipter.17" "chiron.1"  "phorid.5"  "culici.1"  "dolich.2" 
##  [37] "tephri.4"  "cecido.4"  "bombyl.4"  "milich.10" "calliph.1" "myceto.1" 
##  [43] "cerato.7"  "cerato.6"  "tephri.1"  "mythic.8"  "mythic.7"  "carnid.1" 
##  [49] "chaobo.1"  "crypto.1"  "oestri.1"  "milich.8"  "ephydr.3"  "chloro.8" 
##  [55] "muscid.6"  "muscid.5"  "odinii.1"  "loncha.1"  "anthom.1"  "chloro.6" 
##  [61] "rhinii.3"  "rhinii.2"  "chloro.5"  "drosop.4"  "muscid.3"  "cecido.3" 
##  [67] "mythic.5"  "dipter.15" "milich.5"  "cecido.2"  "asilid.3"  "dolich.1" 
##  [73] "asilid.2"  "milich.4"  "sarcop.3"  "sepsid.3"  "cerato.4"  "chloro.4" 
##  [79] "asilid.1"  "sarcop.2"  "sarcop.1"  "dipter.13" "cerato.3"  "cecido.1" 
##  [85] "milich.1"  "cerato.1"  "tachin.1"  "mythic.3"  "phorid.4"  "phorid.3" 
##  [91] "phorid.2"  "mythic.2"  "chloro.3"  "coreth.1"  "muscid.2"  "phorid.1" 
##  [97] "mythic.1"  "mythic.4"  "bombyl.2"  "chloro.1"  "chloro.2"  "muscid.1" 
## [103] "drosop.1"
test0 %>%
 filter(ordre %in% c("Coleoptera", "Diptera", "Hymenoptera", "Hemiptera")) %>%
 ggplot() +
  aes(x = superfam, y = fipiabu, fill = ordre) +
  geom_col() +
  scale_fill_hue(direction = 1) +
  theme_minimal()

#Pollinisateurs

poll = subset(test0, superfam == "Apoidea"
              | famille == "Chrysididae" | famille == "Bombylidae" | famille == "Mythicomyiidae"| famille == "Chloropidae" | famille == "Syrphidae" | famille == "Sepsidae"|famille=="Pompilidae"|famille == "Sepsidae"|famille=="Buprestidae" |famille=="Dermestidae"|famille=="Lycidae"|famille=="Scoliidae")
pollt<-t(poll$morphotype)
filetpoll<-filetall
piegepoll<-piegeall
fpollini<-select(filetpoll, Saison, identifiant_arbre, site, date, as.vector(pollt))
ppollini<-select(piegepoll, Saison, identifiant_arbre, site, date, as.vector(pollt))

Abondance pollinisateurs

fpollini$norga<-apply(fpollinix,1,sum)
fpollini$norga
##  [1]  4  1  3  0  0  5  7  4  4  7  8  5  1  3  1  3  2 19  8  5  4  7  2  6  5
## [26]  6 20  4  4  2 42 21 35 23 12 40 16  9 10 21 10 25  2
ppollini$norga<-apply(ppollinix,1,sum)
ppollini$norga
##  [1] 146   2   4   3   2   1  20  37   2   8  11   3   1   3   6   2   2   2   0
## [20]   4  15   0  43   1   4   1   3

Richesse spécifique pollinisateurs

l<-function(x){
  x<-length(x[x!=0])
  }
fpollini$rspe<-apply(fpollinix,1,l)
fpollini$rspe
##  [1]  2  1  2  0  0  3  1  3  2  4  4  3  1  2  1  2  1  9  5  3  3  6  2  5  4
## [26]  5 14  4  3  2 10  7  8  6  6  5  5  6  5  7  5  4  2
ppollini$rspe<-apply(ppollinix,1,l)
ppollini$rspe
##  [1] 5 2 2 1 1 1 2 8 2 3 8 3 1 3 4 1 1 2 0 4 5 0 4 1 4 1 3
syntfpoll<-subset(fpollini,select=c(Saison , identifiant_arbre,site,date, rspe, norga))
syntppoll<-subset(ppollini,select=c(Saison, identifiant_arbre,site,date, rspe, norga))
library(lme4)
syntfpoll<- mutate(syntfpoll, saison = as.factor(Saison), 
               site = as.factor(site))
syntfpoll<-left_join(syntfpoll,flor,by="identifiant_arbre")

syntppoll<- mutate(syntppoll, saison = as.factor(Saison), 
               site = as.factor(site))
syntppoll<-left_join(syntppoll,flor,by="identifiant_arbre")
library(ggplot2)
#Filet
colorpoll <- c("#333333","#FF6F00","#26A69A")
ggplot(syntfpoll, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.4),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colorpoll) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.4)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
    ggtitle("Filet - Richesse spécifique")  +
        coord_cartesian(ylim = c(0, 15))+
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.4), : Ignoring unknown aesthetics: ymin and ymax

#Piege
ggplot(syntppoll, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.4),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colorpoll) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.4)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
    ggtitle("Pieges - Richesse spécifique")  +
      coord_cartesian(ylim = c(0, 15))+
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.4), : Ignoring unknown aesthetics: ymin and ymax

#Filet
ggplot(syntfpoll, aes(x=Saison, y=norga,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.4),aes(ymin=norga-sd(norga), ymax=norga+sd(norga)))+
 theme_bw() + scale_color_manual(values=colorpoll) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.4)) + labs(x = "Saison", y = "Abondance", fill="Site") +
    ggtitle("Filet - Abondance")  +
        coord_cartesian(ylim = c(0,40))+
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.4), : Ignoring unknown aesthetics: ymin and ymax

#Piege
ggplot(syntppoll, aes(x=Saison, y=norga,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.4),aes(ymin=norga-sd(norga), ymax=norga+sd(norga)))+
 theme_bw() + scale_color_manual(values=colorpoll) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.4)) + labs(x = "Saison", y = "Abondance", fill="Site") +
    ggtitle("Pieges - Abondance")  +
          coord_cartesian(ylim = c(0, 150))+
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.4), : Ignoring unknown aesthetics: ymin and ymax

glmpol1<-glmer(rspe ~ site*Saison+(1|floraison), data = syntfpoll, family=poisson, nAGQ=2) #Estimation des paramètres du modèle par la Quadrature de Gauss-Hermite (Bolker, 2008) 
## boundary (singular) fit: see help('isSingular')
summary(glmpol1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * Saison + (1 | floraison)
##    Data: syntfpoll
## 
##      AIC      BIC   logLik deviance df.resid 
##     56.5     74.1    -18.3     36.5       33 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1798 -0.5460 -0.1118  0.5422  2.8805 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 43, groups:  floraison, 17
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                     1.1632     0.2500   4.653 3.28e-06 ***
## siteExt_Reserve                 0.7239     0.3046   2.376   0.0175 *  
## siteReserve                     0.1719     0.3393   0.506   0.6125    
## SaisonFevrier                   0.4463     0.3202   1.394   0.1633    
## SaisonJuin                     -0.8267     0.4532  -1.824   0.0681 .  
## siteExt_Reserve:SaisonFevrier  -0.7929     0.4519  -1.755   0.0793 .  
## siteReserve:SaisonFevrier       0.2202     0.4268   0.516   0.6059    
## siteExt_Reserve:SaisonJuin     -0.7239     0.6152  -1.177   0.2393    
## siteReserve:SaisonJuin          0.5903     0.5698   1.036   0.3002    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.821                                                   
## siteReserve -0.737  0.605                                            
## SaisonFevrr -0.781  0.641  0.575                                     
## SaisonJuin  -0.552  0.453  0.406  0.431                              
## stExt_Rs:SF  0.553 -0.674 -0.408 -0.708 -0.305                       
## stRsrv:SsnF  0.586 -0.481 -0.795 -0.750 -0.323  0.531                
## stExt_Rs:SJ  0.406 -0.495 -0.299 -0.317 -0.737  0.334   0.238        
## stRsrv:SsnJ  0.439 -0.360 -0.596 -0.343 -0.795  0.243   0.473  0.586 
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
Anova(glmpol1, type=3, method="chisq") #methode chis2 car glmer et type 3 car plan déséquilibré et présence d'une interaction
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: rspe
##               Chisq Df Pr(>Chisq)    
## (Intercept) 21.6467  1  3.278e-06 ***
## site         7.0114  2    0.03003 *  
## Saison       9.1622  2    0.01024 *  
## site:Saison  9.1262  4    0.05802 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmpol1))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmpol1) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.5743682 0.5743682
## lognormal 0.6020896 0.6020896
## trigamma  0.5428376 0.5428376
#trigamma la plus fiable

TEST - PAIRWISE - Richesse spécifique - filet

emtpol1 <- lsmeans(glmpol1, ~ site, by="Saison")
pairs(emtpol1)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.724 0.305 Inf  -2.376  0.0460
##  (Bas-fond) - Reserve       -0.172 0.339 Inf  -0.506  0.8682
##  Ext_Reserve - Reserve       0.552 0.288 Inf   1.917  0.1338
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.069 0.334 Inf   0.207  0.9767
##  (Bas-fond) - Reserve       -0.392 0.259 Inf  -1.514  0.2841
##  Ext_Reserve - Reserve      -0.461 0.314 Inf  -1.469  0.3058
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.000 0.535 Inf   0.000  1.0000
##  (Bas-fond) - Reserve       -0.762 0.458 Inf  -1.665  0.2188
##  Ext_Reserve - Reserve      -0.762 0.458 Inf  -1.665  0.2188
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
glmpol2<-glmer(rspe ~ site*Saison+(1|floraison), data = syntppoll, family=poisson, nAGQ=2) #Estimation des paramètres du modèle par la Quadrature de Gauss-Hermite (Bolker, 2008) 
## boundary (singular) fit: see help('isSingular')
summary(glmpol2)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * Saison + (1 | floraison)
##    Data: syntppoll
## 
##      AIC      BIC   logLik deviance df.resid 
##     45.1     57.7    -12.5     25.1       16 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7321 -0.7796  0.0000  0.5421  2.0000 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 26, groups:  floraison, 16
## 
## Fixed effects:
##                                 Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                    8.473e-01  3.780e-01   2.242    0.025 *
## siteExt_Reserve                5.390e-01  4.756e-01   1.133    0.257  
## siteReserve                   -1.130e-15  5.345e-01   0.000    1.000  
## SaisonFevrier                  1.335e-01  5.175e-01   0.258    0.796  
## SaisonJuin                    -1.542e-01  5.563e-01  -0.277    0.782  
## siteExt_Reserve:SaisonFevrier -6.035e-01  7.424e-01  -0.813    0.416  
## siteReserve:SaisonFevrier      1.178e-01  7.224e-01   0.163    0.870  
## siteExt_Reserve:SaisonJuin    -1.232e+00  8.522e-01  -1.446    0.148  
## siteReserve:SaisonJuin         9.163e-01  7.204e-01   1.272    0.203  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.795                                                   
## siteReserve -0.707  0.562                                            
## SaisonFevrr -0.730  0.580  0.516                                     
## SaisonJuin  -0.679  0.540  0.480  0.496                              
## stExt_Rs:SF  0.509 -0.641 -0.360 -0.697 -0.346                       
## stRsrv:SsnF  0.523 -0.416 -0.740 -0.716 -0.355  0.499                
## stExt_Rs:SJ  0.444 -0.558 -0.314 -0.324 -0.653  0.358   0.232        
## stRsrv:SsnJ  0.525 -0.417 -0.742 -0.383 -0.772  0.267   0.549  0.504 
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
Anova(glmpol2, type=3, method="chisq") #methode chis2 car glmer et type 3 car plan déséquilibré et présence d'une interaction
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: rspe
##              Chisq Df Pr(>Chisq)  
## (Intercept) 5.0254  1    0.02498 *
## site        1.8772  2    0.39118  
## Saison      0.2842  2    0.86752  
## site:Saison 8.1337  4    0.08680 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmpol2))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmpol2) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
## boundary (singular) fit: see help('isSingular')
##                 R2m       R2c
## delta     0.3521363 0.3521363
## lognormal 0.3889913 0.3889913
## trigamma  0.3114272 0.3114272
#trigamma la plus fiable

TEST - PAIRWISE - Richesse spécifique - piege

emtpol3<- lsmeans(glmpol2, ~ site, by="Saison")
pairs(emtpol3)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.5390 0.476 Inf  -1.133  0.4935
##  (Bas-fond) - Reserve       0.0000 0.535 Inf   0.000  1.0000
##  Ext_Reserve - Reserve      0.5390 0.476 Inf   1.133  0.4935
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.0645 0.570 Inf   0.113  0.9930
##  (Bas-fond) - Reserve      -0.1178 0.486 Inf  -0.242  0.9681
##  Ext_Reserve - Reserve     -0.1823 0.558 Inf  -0.327  0.9428
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.6931 0.707 Inf   0.980  0.5894
##  (Bas-fond) - Reserve      -0.9163 0.483 Inf  -1.897  0.1395
##  Ext_Reserve - Reserve     -1.6094 0.632 Inf  -2.545  0.0294
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtpol4 <- lsmeans(glmpol2, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtpol4)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier   0.0284 0.299 Inf   0.095  0.9950
##  Aout - Juin      0.2594 0.322 Inf   0.805  0.7002
##  Fevrier - Juin   0.2310 0.334 Inf   0.692  0.7681
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Filet - Abondance

glmpol3<-glmer(norga ~ site*Saison+(1|floraison), data = syntfpoll, family=poisson, nAGQ=2) #Estimation des paramètres du modèle par la Quadrature de Gauss-Hermite (Bolker, 2008) 
summary(glmpol3)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: norga ~ site * Saison + (1 | floraison)
##    Data: syntfpoll
## 
##      AIC      BIC   logLik deviance df.resid 
##    109.8    127.4    -44.9     89.8       33 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.1105 -0.7552 -0.1464  0.7620  2.5113 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0.09515  0.3085  
## Number of obs: 43, groups:  floraison, 17
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                     1.2539     0.2702   4.641 3.47e-06 ***
## siteExt_Reserve                 0.9613     0.2959   3.249  0.00116 ** 
## siteReserve                     0.3861     0.3393   1.138  0.25509    
## SaisonFevrier                   1.1757     0.2962   3.969 7.22e-05 ***
## SaisonJuin                     -0.6605     0.4387  -1.506  0.13219    
## siteExt_Reserve:SaisonFevrier  -0.2265     0.3590  -0.631  0.52804    
## siteReserve:SaisonFevrier       0.4349     0.3782   1.150  0.25022    
## siteExt_Reserve:SaisonJuin     -0.3703     0.5332  -0.695  0.48736    
## siteReserve:SaisonJuin          0.7067     0.5225   1.353  0.17614    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.747                                                   
## siteReserve -0.743  0.578                                            
## SaisonFevrr -0.806  0.653  0.669                                     
## SaisonJuin  -0.587  0.450  0.471  0.506                              
## stExt_Rs:SF  0.682 -0.806 -0.557 -0.816 -0.424                       
## stRsrv:SsnF  0.649 -0.517 -0.879 -0.778 -0.408  0.646                
## stExt_Rs:SJ  0.423 -0.551 -0.316 -0.359 -0.787  0.445   0.270        
## stRsrv:SsnJ  0.479 -0.374 -0.635 -0.420 -0.825  0.352   0.556  0.647
Anova(glmpol3, type=3, method="chisq") #methode chis2 car glmer et type 3 car plan déséquilibré et présence d'une interaction
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: norga
##               Chisq Df Pr(>Chisq)    
## (Intercept) 21.5385  1  3.468e-06 ***
## site        11.3752  2   0.003388 ** 
## Saison      32.3448  2  9.471e-08 ***
## site:Saison  6.9914  4   0.136341    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmpol3))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmpol3) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.7828140 0.8886975
## lognormal 0.7869224 0.8933616
## trigamma  0.7783375 0.8836156
#trigamma la plus fiable
emtpol5<- lsmeans(glmpol3, ~ site, by="Saison")
pairs(emtpol5)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.9613 0.296 Inf  -3.249  0.0033
##  (Bas-fond) - Reserve      -0.3861 0.339 Inf  -1.138  0.4906
##  Ext_Reserve - Reserve      0.5752 0.294 Inf   1.954  0.1237
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.7348 0.213 Inf  -3.457  0.0016
##  (Bas-fond) - Reserve      -0.8210 0.181 Inf  -4.545  <.0001
##  Ext_Reserve - Reserve     -0.0862 0.194 Inf  -0.444  0.8969
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.5910 0.445 Inf  -1.329  0.3792
##  (Bas-fond) - Reserve      -1.0928 0.404 Inf  -2.707  0.0186
##  Ext_Reserve - Reserve     -0.5018 0.339 Inf  -1.482  0.2996
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtpol6 <- lsmeans(glmpol3, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtpol6)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier   -1.245 0.147 Inf  -8.491  <.0001
##  Aout - Juin       0.548 0.214 Inf   2.567  0.0277
##  Fevrier - Juin    1.794 0.191 Inf   9.412  <.0001
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

piege abondance

glmpol4<-glmer(norga ~ site*Saison+(1|floraison), data = syntppoll, family=poisson, nAGQ=2) #Estimation des paramètres du modèle par la Quadrature de Gauss-Hermite (Bolker, 2008) 
summary(glmpol4)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: norga ~ site * Saison + (1 | floraison)
##    Data: syntppoll
## 
##      AIC      BIC   logLik deviance df.resid 
##    113.8    126.4    -46.9     93.8       16 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -2.5439 -0.7433 -0.1272  0.6862  4.2084 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0.3722   0.6101  
## Number of obs: 26, groups:  floraison, 16
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                    0.74839    0.44576   1.679  0.09317 . 
## siteExt_Reserve                1.18251    0.66062   1.790  0.07345 . 
## siteReserve                    0.49530    0.62501   0.792  0.42809   
## SaisonFevrier                  0.45247    0.52054   0.869  0.38472   
## SaisonJuin                     0.12282    0.67303   0.182  0.85520   
## siteExt_Reserve:SaisonFevrier  0.07825    0.86530   0.090  0.92794   
## siteReserve:SaisonFevrier      0.61604    0.75119   0.820  0.41217   
## siteExt_Reserve:SaisonJuin    -2.03371    0.97788  -2.080  0.03755 * 
## siteReserve:SaisonJuin         2.58270    0.83295   3.101  0.00193 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv SsnFvr SasnJn sE_R:SF stR:SF sE_R:SJ
## sitExt_Rsrv -0.674                                                   
## siteReserve -0.640  0.431                                            
## SaisonFevrr -0.554  0.374  0.425                                     
## SaisonJuin  -0.657  0.443  0.416  0.360                              
## stExt_Rs:SF  0.605 -0.824 -0.421 -0.703 -0.393                       
## stRsrv:SsnF  0.473 -0.319 -0.774 -0.686 -0.310  0.541                
## stExt_Rs:SJ  0.468 -0.684 -0.277 -0.262 -0.695  0.570   0.199        
## stRsrv:SsnJ  0.486 -0.328 -0.693 -0.314 -0.775  0.315   0.535  0.599
Anova(glmpol4, type=3, method="chisq") #methode chis2 car glmer et type 3 car plan déséquilibré et présence d'une interaction
## Analysis of Deviance Table (Type III Wald chisquare tests)
## 
## Response: norga
##               Chisq Df Pr(>Chisq)    
## (Intercept)  2.8188  1    0.09317 .  
## site         3.2046  2    0.20143    
## Saison       0.7752  2    0.67868    
## site:Saison 53.3503  4  7.198e-11 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmpol4))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmpol4) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.7329657 0.9460272
## lognormal 0.7347253 0.9482982
## trigamma  0.7310475 0.9435514
#trigamma la plus fiable
emtpol7<- lsmeans(glmpol4, ~ site, by="Saison")
pairs(emtpol7)
## Saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -1.183 0.661 Inf  -1.790  0.1729
##  (Bas-fond) - Reserve       -0.495 0.625 Inf  -0.792  0.7077
##  Ext_Reserve - Reserve       0.687 0.686 Inf   1.002  0.5759
## 
## Saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -1.261 0.493 Inf  -2.558  0.0284
##  (Bas-fond) - Reserve       -1.111 0.478 Inf  -2.325  0.0524
##  Ext_Reserve - Reserve       0.149 0.428 Inf   0.349  0.9349
## 
## Saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.851 0.713 Inf   1.193  0.4573
##  (Bas-fond) - Reserve       -3.078 0.602 Inf  -5.110  <.0001
##  Ext_Reserve - Reserve      -3.929 0.489 Inf  -8.029  <.0001
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emtpol8 <- lsmeans(glmpol4, ~ Saison)
## NOTE: Results may be misleading due to involvement in interactions
pairs(emtpol8)
##  contrast       estimate    SE  df z.ratio p.value
##  Aout - Fevrier   -0.684 0.324 Inf  -2.109  0.0879
##  Aout - Juin      -0.306 0.388 Inf  -0.789  0.7098
##  Fevrier - Juin    0.378 0.418 Inf   0.904  0.6378
## 
## Results are averaged over the levels of: site 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

#Réseaux bipartites

Août

## Loading required package: sna
## Loading required package: statnet.common
## 
## Attaching package: 'statnet.common'
## The following objects are masked from 'package:base':
## 
##     attr, order
## Loading required package: network
## 
## 'network' 1.18.1 (2023-01-24), part of the Statnet Project
## * 'news(package="network")' for changes since last version
## * 'citation("network")' for citation information
## * 'https://statnet.org' for help, support, and other information
## sna: Tools for Social Network Analysis
## Version 2.7-1 created on 2023-01-24.
## copyright (c) 2005, Carter T. Butts, University of California-Irvine
##  For citation information, type citation("sna").
##  Type help(package="sna") to get started.
## 
## Attaching package: 'sna'
## The following objects are masked from 'package:ape':
## 
##     consensus, degree
## The following object is masked from 'package:nlme':
## 
##     gapply
##  This is bipartite 2.18.
##  For latest changes see versionlog in ?"bipartite-package". For citation see: citation("bipartite").
##  Have a nice time plotting and analysing two-mode networks.
## 
## Attaching package: 'bipartite'
## The following object is masked from 'package:MuMIn':
## 
##     nested
## The following object is masked from 'package:vegan':
## 
##     nullmodel

Aout - Réserve

plot1<-plotweb(rsar,method="cca",
    text.rot=90,
    col.high=
      c(rep("#26A69A",1),rep("#CDDC39",1),rep("#FF5722",1),rep("#26A69A",1),rep("#CDDC39",2),
        rep("#FF5722",2),rep("#CDDC39",2),rep("#26A69A",1)),
    col.interaction="#263238",
             high.spacing =0.001,
         low.spacing =0.01,
    col.low="#FAFAFA",
    bor.col.high="white",
    bor.col.low="black",
    high.lablength=9,
    bor.col.interaction = "white", #remove the black border color
    high.lab.dis = 0,
    adj.high=-0.1,
        low.xoff = 0,
    ybig=0,
    y.lim = c(0,2))

Indices

null.t.test(rsar, index=c("connectance","interaction evenness","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.3454545 0.3872727 0.3776465 0.3968989  8.884913
## modularity Q         0.4334705 0.3774120 0.3611314 0.3936926 -7.042288
## interaction evenness 0.7102788 0.7436814 0.7362179 0.7511450  9.153285
##                                 P
## connectance          8.983701e-10
## modularity Q         9.566584e-08
## interaction evenness 4.721408e-10
# Tous significativement différents

Modèle nul + Comparaison des connectances

library(vegan)
library(bipartite)
obs1 <- unlist (networklevel (rsar, index="connectance"))
obs0d <- unlist (networklevel (rsar, index="H2"))
obs0e<-nestednodf(rsar)

#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul0<-nullmodel(rsar,method="r2dtable")
null0d<-unlist(sapply(nul0,networklevel,index="H2"))
null0e<-unlist(sapply(nul0,nestednodf))
#Valeurs du paramètres sous un modèle nul

Aout - Extérieur

plot2<-plotweb(rsae,method="cca",
    text.rot=90,
    col.high=
      c(rep("#26A69A",2), rep("#CDDC39",1), rep("#26A69A",1),rep("#CDDC39",3), rep("#26A69A",1), rep("#CDDC39",1), 
      rep("#26A69A",1),  rep("#CDDC39",2),rep("#FF5722",1),rep("#26A69A",5)),
    col.interaction="#263238",
             high.spacing =0.001,
         low.spacing =0.01,
    col.low="#FAFAFA",
    bor.col.high="white",
    bor.col.low="black",
    high.lablength=9,
    bor.col.interaction = "white", #remove the black border color
    high.lab.dis = 0,
    adj.high=-0.1,
        low.xoff = 0,
    ybig=0,
    y.lim = c(0,2))

Indices

networklevel(rsae)
##                       connectance                     web asymmetry 
##                        0.36666667                        0.56521739 
##                 links per species            number of compartments 
##                        1.43478261                        1.00000000 
##             compartment diversity               cluster coefficient 
##                                NA                        0.30000000 
##                      modularity Q                        nestedness 
##                        0.30473373                       18.38844379 
##                              NODF               weighted nestedness 
##                       57.62781186                        0.61746997 
##                     weighted NODF    interaction strength asymmetry 
##                       25.59986367                        0.05263492 
##          specialisation asymmetry                   linkage density 
##                       -0.29134359                        5.38058336 
##              weighted connectance                      Fisher alpha 
##                        0.23393841                       38.83866585 
##                 Shannon diversity              interaction evenness 
##                        3.33321599                        0.74074599 
##      Alatalo interaction evenness                                H2 
##                        0.82544279                        0.22026748 
##              number.of.species.HL              number.of.species.LL 
##                       18.00000000                        5.00000000 
## mean.number.of.shared.partners.HL mean.number.of.shared.partners.LL 
##                        0.93464052                        2.30000000 
##            cluster.coefficient.HL            cluster.coefficient.LL 
##                        0.54230769                        0.53739316 
##   weighted.cluster.coefficient.HL   weighted.cluster.coefficient.LL 
##                        0.70488722                        0.22080985 
##                  niche.overlap.HL                  niche.overlap.LL 
##                        0.48813593                        0.38197616 
##                   togetherness.HL                   togetherness.LL 
##                        0.31699346                        0.13580247 
##                        C.score.HL                        C.score.LL 
##                        0.28976035                        0.30964286 
##                        V.ratio.HL                        V.ratio.LL 
##                        1.21090909                        5.88372093 
##                    discrepancy.HL                    discrepancy.LL 
##                        9.00000000                        8.00000000 
##               extinction.slope.HL               extinction.slope.LL 
##                        5.29461804                        1.57002101 
##                     robustness.HL                     robustness.LL 
##                        0.75936285                        0.42184878 
##     functional.complementarity.HL     functional.complementarity.LL 
##                       26.76886424                       24.42534585 
##              partner.diversity.HL              partner.diversity.LL 
##                        0.81844807                        1.99818433 
##                     generality.HL                  vulnerability.LL 
##                        2.46854646                        8.29262026
null.t.test(rsae, index=c("connectance","interaction evenness","H2","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.3666667 0.3551852 0.3488804 0.3614900 -3.724524
## modularity Q         0.3047337 0.3204635 0.3107326 0.3301944  3.306067
## interaction evenness 0.7407460 0.7317846 0.7275702 0.7359990 -4.348903
## H2                   0.2202675 0.2586846 0.2406176 0.2767517  4.348903
##                                 P
## connectance          0.0008405781
## modularity Q         0.0025270212
## interaction evenness 0.0001540346
## H2                   0.0001540346
# Tous significativement différents

Modèle nul + Comparaison des connectances

library(vegan)
obs2 <- unlist (networklevel (rsae, index="connectance"))
obs2d <- unlist (networklevel (rsae, index="H2"))
obs2e<-nestednodf(rsae)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul2<-nullmodel(rsae,method="r2dtable")
null2d<-unlist(sapply(nul2,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Aout - Bas-Fond

plot3<-plotweb(rsab,method="cca",
    text.rot=90,
    col.high=
      c(rep("#CDDC39",3),rep("#26A69A",1),rep("#CDDC39",1),rep("#FF5722",1), rep("#CDDC39",1),rep("#26A69A",4),rep("purple",1)),
    col.interaction="#263238",
             high.spacing =0.001,
         low.spacing =0.01,
    col.low="#FAFAFA",
    bor.col.high="white",
    bor.col.low="black",
    high.lablength=9,
    bor.col.interaction = "white", #remove the black border color
    high.lab.dis = 0,
    adj.high=-0.1,
        low.xoff = 0,
    ybig=0,
    y.lim = c(0,2))

Indices

null.t.test(rsab, index=c("connectance","interaction evenness","H2","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.2909091 0.3042424 0.2969056 0.3115792  3.716848
## modularity Q         0.5370370 0.4989712 0.4800500 0.5178924 -4.114616
## interaction evenness 0.6828329 0.6964432 0.6883646 0.7045217  3.445652
## H2                   0.2579019 0.1665826 0.1123784 0.2207868 -3.445652
##                                 P
## connectance          0.0008579960
## modularity Q         0.0002928185
## interaction evenness 0.0017579587
## H2                   0.0017579587
# Tous significativement différents

Modèle nul + Comparaison des connectances

library(vegan)
obs3 <- unlist (networklevel (rsab, index="connectance"))
obs3d <- unlist (networklevel (rsab, index="H2"))
obs3e<-nestednodf(rsab)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul3<-nullmodel(rsab,method="r2dtable")
null3d<-unlist(sapply(nul3,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Février

Février - Réserve

Indices

null.t.test(rsfr, index=c("connectance","interaction evenness","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.4625000 0.4966667 0.4900733 0.5032600  10.59834
## modularity Q         0.2225677 0.1634443 0.1574836 0.1694051 -20.28618
## interaction evenness 0.7061244 0.7361216 0.7340904 0.7381527  30.20498
##                                 P
## connectance          1.737482e-11
## modularity Q         1.116720e-18
## interaction evenness 1.814629e-23
# Tous significativement différents

Modèle nul + Comparaison des connectances

library(vegan)
obs4 <- unlist (networklevel (rsfr, index="connectance"))
obs4d <- unlist (networklevel (rsfr, index="H2"))
obs4e<-nestednodf(rsfr)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul4<-nullmodel(rsfr,method="r2dtable")
null4d<-unlist(sapply(nul4,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Février - Ext_Parcelle

Indices

null.t.test(rsfe, index=c("connectance","interaction evenness","H2","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.5185185 0.6345679 0.6206272 0.6485086  17.02553
## modularity Q         0.2062186 0.1168775 0.1096739 0.1240812 -25.36536
## interaction evenness 0.6047793 0.6404521 0.6380971 0.6428070  30.98139
## H2                   0.3250773 0.1257983 0.1126429 0.1389536 -30.98139
##                                 P
## connectance          1.226617e-16
## modularity Q         2.399365e-21
## interaction evenness 8.880611e-24
## H2                   8.880611e-24

Modèle nul + Comparaison des connectances

library(vegan)
obs5 <- unlist (networklevel (rsfe, index="connectance"))
obs5d <- unlist (networklevel (rsfe, index="H2"))
obs5e<-nestednodf(rsfe)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul5<-nullmodel(rsfe, method="r2dtable")
null5d<-unlist(sapply(nul5,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Février - Bas_Fond

Indices

null.t.test(rsfb, index=c("connectance","interaction evenness","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.3125000 0.3241667 0.3167173 0.3316160  3.203112
## modularity Q         0.3158284 0.2739275 0.2631068 0.2847482 -7.919739
## interaction evenness 0.6386581 0.6531544 0.6485982 0.6577107  6.507176
##                                 P
## connectance          3.292161e-03
## modularity Q         9.820748e-09
## interaction evenness 4.002054e-07

Modèle nul + Comparaison des connectances

library(vegan)
obs6 <- unlist (networklevel (rsfb, index="connectance"))
obs6d <- unlist (networklevel (rsfb, index="H2"))
obs6e<-nestednodf(rsfb)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul6<-nullmodel(rsfb, method="r2dtable")
null6d<-unlist(sapply(nul6,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Juin

Juin- Réserve

Indices

null.t.test(rsjr, index=c("connectance","interaction evenness","modularity"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.4285714 0.5123810 0.5023050 0.5224569  17.01182
## modularity Q         0.3954082 0.2906463 0.2774490 0.3038435 -16.23541
## interaction evenness 0.7265097 0.7785794 0.7723046 0.7848541  16.97183
##                                 P
## connectance          1.253033e-16
## modularity Q         4.287229e-16
## interaction evenness 1.333483e-16
# Tous significativement différents

Modèle nul + Comparaison des connectances

library(vegan)
obs7 <- unlist (networklevel (rsjr, index="connectance"))
obs7d <- unlist (networklevel (rsjr, index="H2"))
obs7e<-nestednodf(rsjr)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul7<-nullmodel(rsjr,N=500, method="r2dtable")
null7d<-unlist(sapply(nul7,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Juin - Ext_Parcelle

plotweb(rsje,method="cca",
    text.rot=90,
    col.high=
      c(rep("#26A69A",1),rep("#CDDC39",2),rep("#26A69A",2)),
    col.interaction="#263238",
             high.spacing =0.001,
         low.spacing =0.01,
    col.low="#FAFAFA",
    bor.col.high="white",
    bor.col.low="black",
    high.lablength=9,
    bor.col.interaction = "white", #remove the black border color
    high.lab.dis = 0,
    adj.high=-0.1,
        low.xoff = 0,
    ybig=0,
    y.lim = c(0,2))

null.t.test(rsje, index=c("connectance","interaction evenness","H2"))
##                            obs null mean  lower CI  upper CI         t
## connectance          0.4666667 0.6044444 0.5860310 0.6228578  15.30337
## interaction evenness 0.6134756 0.7504326 0.7390070 0.7618582  24.51586
## H2                   0.8449203 0.1836193 0.1295844 0.2376542 -25.03033
##                                 P
## connectance          2.001776e-15
## interaction evenness 6.174708e-21
## H2                   3.471158e-21

Modèle nul + Comparaison des connectances

library(vegan)
obs8 <- unlist (networklevel (rsje, index="connectance"))
obs8d <- unlist (networklevel (rsje, index="H2"))
obs8e<-nestednodf(rsje)
#Avoir la connectance du réseau -> faire pour 3 saisons et avoir une moyenne et une variabilité pour faire une figure?
nul8<-nullmodel(rsje,N=500, method="r2dtable")
null8d<-unlist(sapply(nul8,networklevel,index="H2"))
#Valeurs du paramètres sous un modèle nul

Juin - Bas_Fond

Indices

##                            obs null mean   lower CI  upper CI          t
## connectance          0.2800000 0.3360000 0.32384673 0.3481533   9.424038
## modularity Q         0.6172840 0.4707819 0.44358349 0.4979803 -11.016468
## interaction evenness 0.5869003 0.6538944 0.63935518 0.6684337   9.424038
## H2                   0.5921638 0.1776491 0.08769008 0.2676082  -9.424038
##                                 P
## connectance          2.491065e-10
## modularity Q         7.022318e-12
## interaction evenness 2.491065e-10
## H2                   2.491065e-10

Modèle nul + Comparaison des connectances

Connectance & Création du tableau

Graph - Connectance

## Warning in geom_point(shape = 18, size = 3, alpha = 0.5, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Modularité

modulobsr<-c(0.4234,0.4492,0.4619)
modulobsrobse<-c(0.3406,0.3629,0.4870)
modulobsrobsb<-c(0.3382,0.3629,0.4633)

modulr0<-c(0.3624,0.3784,0.3667)
module0<-c(0.2781,0.2737,0.3852)
modulb0<-c(0.2763,0.2737,0.3361)

modularity<-c(modulobsr,modulobsrobse,modulobsrobsb,modulr0,module0,modulb0)
parars$modularity<-modularity

Graph - Modularity

## Warning in geom_point(shape = 18, size = 3, alpha = 0.5, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Interacton.evennes

evenobsr<-c(0.7488,0.7482,0.7229)
evenobsrobse<-c(0.7319,0.6665,0.7653)
evenobsrobsb<-c(0.7322,0.6665,0.6909)

evenr0<-c(0.7709,0.7765,0.7613)
evene0<-c(0.7551,0.6913,0.7936)
evenb0<-c(0.755,0.6916,0.7439)

evenness<-c(evenobsr,evenobsrobse,evenobsrobsb,evenr0,evene0,evenb0)
parars$evenness<-evenness

Graph - Evenness

## Warning in geom_point(shape = 18, size = 3, alpha = 0.5, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

H2

h2obsr<-c(0.3053,0.3744,0.4139)
h2obse<-c(0.2393,0.2771,0.3416)
h2obsb<-c(0.2393,0.2771,0.3859)
  
h2r0<-c(0.1873,0.2155,0.1915)
h2e0<-c(0.1269,0.1116,0.1676)
h2b0<-c(0.1234,0.1085,0.1344)

H2<-c(h2obsr,h2obse,h2obsb,h2r0,h2e0,h2b0)
parars$H2<-H2

Graph - H2 à modifier

## Warning in geom_point(shape = 18, size = 3, alpha = 0.5, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Nestedness

obs9e
## N columns  : 0.04140787 
## N rows     : 20 
## NODF       : 0.1237113 
## Matrix fill: 0.02
nestobsr<-c(0.4687,0.5706,0.5520)

nestobse<-c(1.05,0.29,1.41)
nestobsb<-c(0.3538,0.3871,0.1566)
  
nestr0<-c(0,0,0)
neste0<-c(0,0,0)
nestb0<-c(0,0,0)

nestedness<-c(nestobsr,nestobse,nestobsb,nestr0,neste0,nestb0)
parars$nestedness<-nestedness

Graph - H2 à modifier

## Warning in geom_point(shape = 18, size = 3, alpha = 0.5, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax
par(mfrow = c(2,2))
nc

nv

nx

nw

#Annexe : Figures Ordre Filet Hymenoptera

library(ggplot2)
coloror <- c("#333333","#FB8C00","#26A69A")
syntfilethy<-subset(syntfilet,syntfilet$ordre=="Hymenoptera")
ggplot(syntfilethy, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=coloror) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 25))+
    ggtitle("Filet - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Coleoptera

colorco<- c("#333333","#FB8C00","#D32F2F")
syntfiletco<-subset(syntfilet,syntfilet$ordre=="Coleoptera")
ggplot(syntfiletco, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colorco) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 10))+
    ggtitle("Filet - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Diptera

syntfiletdi<-subset(syntfilet,syntfilet$ordre=="Diptera")
colordi<- c("#333333","#FB8C00","#CDDC39")
ggplot(syntfiletdi, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colordi) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 10))+
    ggtitle("Filet - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Autres

syntfiletau<-subset(syntfilet,syntfilet$ordre=="Autres")
colorau<- c("#333333","#FB8C00","purple")
ggplot(syntfiletau, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colorau) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 10))+
    ggtitle("Filet - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Pieges

Hymenoptera

library(ggplot2)
coloror <- c("#333333","#FB8C00","#26A69A")
syntpiegehy<-subset(syntpiege,syntpiege$ordre=="Hymenoptera")
ggplot(syntpiegehy, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=coloror) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 25))+
    ggtitle("Piege - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Coleoptera

colorco<- c("#333333","#FB8C00","#D32F2F")
syntpiegeco<-subset(syntpiege,syntpiege$ordre=="Coleoptera")
ggplot(syntpiegeco, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colorco) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 8))+
    ggtitle("Piege - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Diptera

syntpiegedi<-subset(syntpiege,syntpiege$ordre=="Diptera")
colordi<- c("#333333","#FB8C00","#CDDC39")
ggplot(syntpiegedi, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colordi) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 20))+
    ggtitle("Piege - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

Autres

syntpiegeau<-subset(syntpiege,syntpiege$ordre=="Autres")
colorau<- c("#333333","#FB8C00","purple")
ggplot(syntpiegeau, aes(x=Saison, y=rspe,facet=site, color=site)) + 
geom_point(shape=18,size=3, alpha=0.25, position=position_dodge(width=0.3),aes(ymin=rspe-sd(rspe), ymax=rspe+sd(rspe)))+
 theme_bw() + scale_color_manual(values=colorau) +stat_summary(fun.data=mean_sdl, fun.args = list(mult = 1), geom="pointrange", shape=19, size=1,alpha=1,position=position_dodge(width=0.3)) + labs(x = "Saison", y = "Richesse spécifique", fill="Site") +
          coord_cartesian(ylim = c(0, 15))+
    ggtitle("Filet - Richesse spécifique")  +
 theme(axis.text.y = element_text(face="bold",colour = "black", size = 13),
    axis.text.x = element_text(face="bold",colour = "black", size = 13), 
    legend.text = element_text(size = 13, colour ="black"))
## Warning in geom_point(shape = 18, size = 3, alpha = 0.25, position =
## position_dodge(width = 0.3), : Ignoring unknown aesthetics: ymin and ymax

#Annexe : Modèles Ordre

Hymenoptera - Richesse filet & piege

glmhy1 <- glmer(rspe ~ site*saison+(1|floraison ), data = syntfilethy, family = poisson, nAGQ=2) 
## boundary (singular) fit: see help('isSingular')
summary(glmhy1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntfilethy
## 
##      AIC      BIC   logLik deviance df.resid 
##     55.1     72.7    -17.6     35.1       33 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.9379 -0.4867  0.0000  0.3795  2.4463 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 43, groups:  floraison, 17
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                     1.7918     0.1826   9.814  < 2e-16 ***
## siteExt_Reserve                 0.1823     0.2472   0.738  0.46080    
## siteReserve                    -0.1431     0.2679  -0.534  0.59330    
## saisonFevrier                   1.2809     0.2064   6.207 5.41e-10 ***
## saisonJuin                     -0.2231     0.2739  -0.815  0.41518    
## siteExt_Reserve:saisonFevrier  -0.8571     0.3173  -2.701  0.00691 ** 
## siteReserve:saisonFevrier      -0.1952     0.3067  -0.637  0.52438    
## siteExt_Reserve:saisonJuin      0.3032     0.3584   0.846  0.39753    
## siteReserve:saisonJuin          0.3662     0.3831   0.956  0.33912    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.739                                                 
## siteReserve -0.681  0.503                                          
## saisonFevrr -0.885  0.653  0.603                                   
## saisonJuin  -0.667  0.492  0.454  0.590                            
## stExt_Rsr:F  0.575 -0.779 -0.392 -0.650 -0.384                     
## stRsrv:ssnF  0.595 -0.440 -0.874 -0.673 -0.397  0.438              
## stExt_Rsr:J  0.509 -0.690 -0.347 -0.451 -0.764  0.537  0.303       
## stRsrv:ssnJ  0.477 -0.352 -0.699 -0.422 -0.715  0.274  0.611  0.546
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmhy1)
## Analysis of Variance Table
##             npar Sum Sq Mean Sq F value
## site           2 16.040   8.020  8.0201
## saison         2 91.028  45.514 45.5142
## site:saison    4 14.968   3.742  3.7419
#Test des résidus
library(DHARMa)
plot(simulateResiduals(glmhy1))

library(MuMIn) #Détermination du r2
r.squaredGLMM(glmhy1) #R2m représente le r avec seulement les effets fixes, et r2c il y a les effets de groupes
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.6903345 0.6903345
## lognormal 0.7016562 0.7016562
## trigamma  0.6781456 0.6781456
#trigamma la plus fiable

glmhy2 <- glmer(rspe ~ site*saison+(1|floraison), data = syntpiegehy, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
summary(glmhy2)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntpiegehy
## 
##      AIC      BIC   logLik deviance df.resid 
##     43.1     55.7    -11.5     23.1       16 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.6002 -0.7091  0.0000  0.4818  2.8311 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 26, groups:  floraison, 16
## 
## Fixed effects:
##                                Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    1.098612   0.333333   3.296 0.000981 ***
## siteExt_Reserve                0.893818   0.395684   2.259 0.023888 *  
## siteReserve                    0.747214   0.404651   1.847 0.064810 .  
## saisonFevrier                  0.575364   0.416667   1.381 0.167318    
## saisonJuin                     0.105361   0.459468   0.229 0.818628    
## siteExt_Reserve:saisonFevrier -1.063717   0.574610  -1.851 0.064141 .  
## siteReserve:saisonFevrier     -1.440362   0.592657  -2.430 0.015084 *  
## siteExt_Reserve:saisonJuin    -0.200671   0.553684  -0.362 0.717032    
## siteReserve:saisonJuin        -0.005277   0.557998  -0.009 0.992454    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.842                                                 
## siteReserve -0.824  0.694                                          
## saisonFevrr -0.800  0.674  0.659                                   
## saisonJuin  -0.725  0.611  0.598  0.580                            
## stExt_Rsr:F  0.580 -0.689 -0.478 -0.725 -0.421                     
## stRsrv:ssnF  0.562 -0.474 -0.683 -0.703 -0.408  0.510              
## stExt_Rsr:J  0.602 -0.715 -0.496 -0.482 -0.830  0.492  0.339       
## stRsrv:ssnJ  0.597 -0.503 -0.725 -0.478 -0.823  0.347  0.495  0.683
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmhy2)
## Analysis of Variance Table
##             npar Sum Sq Mean Sq F value
## site           2 4.8794 2.43972  2.4397
## saison         2 1.0546 0.52729  0.5273
## site:saison    4 8.6078 2.15194  2.1519
plot(simulateResiduals(glmhy2))

r.squaredGLMM(glmhy2)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.4332043 0.4332043
## lognormal 0.4551452 0.4551452
## trigamma  0.4095678 0.4095678
library(emmeans)
emhy1 <- lsmeans(glmhy1, ~ site, by="saison")
pairs(emhy1)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.182 0.247 Inf  -0.738  0.7412
##  (Bas-fond) - Reserve        0.143 0.268 Inf   0.534  0.8546
##  Ext_Reserve - Reserve       0.325 0.257 Inf   1.264  0.4154
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.675 0.199 Inf   3.393  0.0020
##  (Bas-fond) - Reserve        0.338 0.149 Inf   2.268  0.0603
##  Ext_Reserve - Reserve      -0.336 0.208 Inf  -1.617  0.2383
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.486 0.259 Inf  -1.871  0.1470
##  (Bas-fond) - Reserve       -0.223 0.274 Inf  -0.815  0.6938
##  Ext_Reserve - Reserve       0.262 0.243 Inf   1.080  0.5263
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emhy2 <- lsmeans(glmhy2, ~ site, by="saison")
pairs(emhy2)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.8938 0.396 Inf  -2.259  0.0617
##  (Bas-fond) - Reserve      -0.7472 0.405 Inf  -1.847  0.1546
##  Ext_Reserve - Reserve      0.1466 0.313 Inf   0.468  0.8863
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.1699 0.417 Inf   0.408  0.9124
##  (Bas-fond) - Reserve       0.6931 0.433 Inf   1.601  0.2453
##  Ext_Reserve - Reserve      0.5232 0.486 Inf   1.077  0.5285
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.6931 0.387 Inf  -1.790  0.1730
##  (Bas-fond) - Reserve      -0.7419 0.384 Inf  -1.931  0.1300
##  Ext_Reserve - Reserve     -0.0488 0.312 Inf  -0.156  0.9866
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Diptera - Richesse filet & piege

glmdi1<-glmer(rspe ~ site*saison+(1|floraison), data = syntfiletdi, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
glmdi2<-glmer(rspe ~ site*saison+(1|floraison), data = syntpiegedi, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
summary(glmdi1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntfiletdi
## 
##      AIC      BIC   logLik deviance df.resid 
##     52.1     69.7    -16.0     32.1       33 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.34164 -0.52994 -0.09759  0.54998  2.00000 
## 
## Random effects:
##  Groups    Name        Variance  Std.Dev. 
##  floraison (Intercept) 7.541e-16 2.746e-08
## Number of obs: 43, groups:  floraison, 17
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    1.52606    0.20851   7.319  2.5e-13 ***
## siteExt_Reserve                0.04256    0.29180   0.146  0.88404    
## siteReserve                   -0.09097    0.30182  -0.301  0.76310    
## saisonFevrier                 -0.57054    0.34699  -1.644  0.10012    
## saisonJuin                    -1.52606    0.49344  -3.093  0.00198 ** 
## siteExt_Reserve:saisonFevrier  0.73653    0.46999   1.567  0.11709    
## siteReserve:saisonFevrier      0.74490    0.45609   1.633  0.10242    
## siteExt_Reserve:saisonJuin     0.42744    0.64043   0.667  0.50449    
## siteReserve:saisonJuin         1.04648    0.60665   1.725  0.08452 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.715                                                 
## siteReserve -0.691  0.494                                          
## saisonFevrr -0.601  0.429  0.415                                   
## saisonJuin  -0.423  0.302  0.292  0.254                            
## stExt_Rsr:F  0.444 -0.621 -0.306 -0.738 -0.187                     
## stRsrv:ssnF  0.457 -0.327 -0.662 -0.761 -0.193  0.562              
## stExt_Rsr:J  0.326 -0.456 -0.225 -0.196 -0.770  0.283  0.149       
## stRsrv:ssnJ  0.344 -0.246 -0.498 -0.207 -0.813  0.152  0.329  0.627
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmdi1)
## Analysis of Variance Table
##             npar  Sum Sq Mean Sq F value
## site           2  2.1220  1.0610  1.0610
## saison         2 17.8833  8.9416  8.9416
## site:saison    4  5.5578  1.3894  1.3894
r.squaredGLMM(glmdi1)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.5194504 0.5194504
## lognormal 0.5520962 0.5520962
## trigamma  0.4822161 0.4822161
summary(glmdi2)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntpiegedi
## 
##      AIC      BIC   logLik deviance df.resid 
##     40.4     53.0    -10.2     20.4       16 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.51186 -0.59660 -0.06155  0.60593  1.88982 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 26, groups:  floraison, 16
## 
## Fixed effects:
##                                 Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    2.159e+00  1.961e-01  11.011   <2e-16 ***
## siteExt_Reserve                4.721e-16  2.774e-01   0.000   1.0000    
## siteReserve                    2.384e-01  2.622e-01   0.909   0.3633    
## saisonFevrier                 -1.671e-01  2.897e-01  -0.577   0.5642    
## saisonJuin                    -9.555e-01  3.721e-01  -2.568   0.0102 *  
## siteExt_Reserve:saisonFevrier -6.061e-01  4.974e-01  -1.219   0.2230    
## siteReserve:saisonFevrier     -2.849e-01  4.023e-01  -0.708   0.4788    
## siteExt_Reserve:saisonJuin    -1.054e-01  5.367e-01  -0.196   0.8444    
## siteReserve:saisonJuin        -1.431e-01  5.096e-01  -0.281   0.7788    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.707                                                 
## siteReserve -0.748  0.529                                          
## saisonFevrr -0.677  0.479  0.506                                   
## saisonJuin  -0.527  0.373  0.394  0.357                            
## stExt_Rsr:F  0.394 -0.558 -0.295 -0.582 -0.208                     
## stRsrv:ssnF  0.487 -0.345 -0.652 -0.720 -0.257  0.419              
## stExt_Rsr:J  0.365 -0.517 -0.273 -0.247 -0.693  0.288  0.178       
## stRsrv:ssnJ  0.385 -0.272 -0.515 -0.261 -0.730  0.152  0.335  0.506
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmdi2)
## Analysis of Variance Table
##             npar  Sum Sq Mean Sq F value
## site           2  1.9455  0.9728  0.9728
## saison         2 24.7029 12.3514 12.3514
## site:saison    4  1.5824  0.3956  0.3956
r.squaredGLMM(glmdi2)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.5770711 0.5770711
## lognormal 0.5957295 0.5957295
## trigamma  0.5567002 0.5567002
plot(simulateResiduals(glmdi1))

plot(simulateResiduals(glmdi2))

emdi1 <- lsmeans(glmdi1, ~ site, by="saison")
pairs(emdi1)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.0426 0.292 Inf  -0.146  0.9883
##  (Bas-fond) - Reserve       0.0910 0.302 Inf   0.301  0.9512
##  Ext_Reserve - Reserve      0.1335 0.299 Inf   0.447  0.8958
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.7791 0.368 Inf  -2.115  0.0869
##  (Bas-fond) - Reserve      -0.6539 0.342 Inf  -1.912  0.1351
##  Ext_Reserve - Reserve      0.1252 0.314 Inf   0.398  0.9163
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve  -0.4700 0.570 Inf  -0.824  0.6878
##  (Bas-fond) - Reserve      -0.9555 0.526 Inf  -1.816  0.1644
##  Ext_Reserve - Reserve     -0.4855 0.449 Inf  -1.080  0.5262
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emdi2 <- lsmeans(glmdi2, ~ site, by="saison")
pairs(emdi2)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.0000 0.277 Inf   0.000  1.0000
##  (Bas-fond) - Reserve      -0.2384 0.262 Inf  -0.909  0.6345
##  Ext_Reserve - Reserve     -0.2384 0.262 Inf  -0.909  0.6345
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.6061 0.413 Inf   1.468  0.3063
##  (Bas-fond) - Reserve       0.0465 0.305 Inf   0.152  0.9873
##  Ext_Reserve - Reserve     -0.5596 0.415 Inf  -1.347  0.3692
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   0.1054 0.459 Inf   0.229  0.9714
##  (Bas-fond) - Reserve      -0.0953 0.437 Inf  -0.218  0.9741
##  Ext_Reserve - Reserve     -0.2007 0.449 Inf  -0.446  0.8960
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Coleoptera - Richesse filet & piege

glmco1<-glmer(rspe ~ site*saison+(1|floraison), data = syntfiletco, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
glmco2<-glmer(rspe ~ site*saison+(1|floraison), data = syntpiegeco, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
summary(glmco1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntfiletco
## 
##      AIC      BIC   logLik deviance df.resid 
##     41.7     59.3    -10.9     21.7       33 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.3416 -0.4743  0.0000  0.3162  1.6330 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 43, groups:  floraison, 17
## 
## Fixed effects:
##                                 Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                    6.931e-01  3.162e-01   2.192   0.0284 *
## siteExt_Reserve               -5.108e-01  5.164e-01  -0.989   0.3226  
## siteReserve                    4.700e-01  4.031e-01   1.166   0.2436  
## saisonFevrier                 -2.256e-15  4.472e-01   0.000   1.0000  
## saisonJuin                    -2.231e-01  4.743e-01  -0.470   0.6380  
## siteExt_Reserve:saisonFevrier -5.878e-01  9.309e-01  -0.631   0.5278  
## siteReserve:saisonFevrier     -1.163e+00  6.801e-01  -1.710   0.0872 .
## siteExt_Reserve:saisonJuin     6.286e-01  7.091e-01   0.887   0.3753  
## siteReserve:saisonJuin         3.409e-01  5.857e-01   0.582   0.5605  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.612                                                 
## siteReserve -0.784  0.480                                          
## saisonFevrr -0.707  0.433  0.555                                   
## saisonJuin  -0.667  0.408  0.523  0.471                            
## stExt_Rsr:F  0.340 -0.555 -0.266 -0.480 -0.226                     
## stRsrv:ssnF  0.465 -0.285 -0.593 -0.658 -0.310  0.316              
## stExt_Rsr:J  0.446 -0.728 -0.350 -0.315 -0.669  0.404  0.207       
## stRsrv:ssnJ  0.540 -0.331 -0.688 -0.382 -0.810  0.183  0.408  0.542
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmco1)
## Analysis of Variance Table
##             npar Sum Sq Mean Sq F value
## site           2 7.3494  3.6747  3.6747
## saison         2 3.2362  1.6181  1.6181
## site:saison    4 5.5231  1.3808  1.3808
r.squaredGLMM(glmco1)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
## boundary (singular) fit: see help('isSingular')
##                 R2m       R2c
## delta     0.3112688 0.3112688
## lognormal 0.3588407 0.3588407
## trigamma  0.2583123 0.2583123
summary(glmco2)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntpiegeco
## 
##      AIC      BIC   logLik deviance df.resid 
##     37.2     49.8     -8.6     17.2       16 
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.2910 -0.5774  0.0000  0.5774  1.1547 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 26, groups:  floraison, 16
## 
## Fixed effects:
##                                 Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                    2.877e-01  5.000e-01   0.575   0.5650  
## siteExt_Reserve                2.231e-01  6.708e-01   0.333   0.7394  
## siteReserve                    6.931e-01  6.124e-01   1.132   0.2577  
## saisonFevrier                  4.055e-01  6.455e-01   0.628   0.5299  
## saisonJuin                    -2.877e-01  7.638e-01  -0.377   0.7064  
## siteExt_Reserve:saisonFevrier  6.425e-10  9.037e-01   0.000   1.0000  
## siteReserve:saisonFevrier     -2.485e+00  1.242e+00  -2.001   0.0454 *
## siteExt_Reserve:saisonJuin    -6.286e-01  1.133e+00  -0.555   0.5790  
## siteReserve:saisonJuin         2.877e-01  9.129e-01   0.315   0.7527  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.745                                                 
## siteReserve -0.816  0.609                                          
## saisonFevrr -0.775  0.577  0.632                                   
## saisonJuin  -0.655  0.488  0.535  0.507                            
## stExt_Rsr:F  0.553 -0.742 -0.452 -0.714 -0.362                     
## stRsrv:ssnF  0.403 -0.300 -0.493 -0.520 -0.264  0.371              
## stExt_Rsr:J  0.441 -0.592 -0.360 -0.342 -0.674  0.440  0.178       
## stRsrv:ssnJ  0.548 -0.408 -0.671 -0.424 -0.837  0.303  0.331  0.564
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmco2)
## Analysis of Variance Table
##             npar Sum Sq Mean Sq F value
## site           2 1.6518 0.82589  0.8259
## saison         2 0.7062 0.35308  0.3531
## site:saison    4 6.9067 1.72668  1.7267
r.squaredGLMM(glmco2)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
## boundary (singular) fit: see help('isSingular')
##                 R2m       R2c
## delta     0.4319689 0.4319689
## lognormal 0.4941881 0.4941881
## trigamma  0.3570453 0.3570453
plot(simulateResiduals(glmco1))

plot(simulateResiduals(glmco2))

emco1 <- lsmeans(glmco1, ~ site, by="saison")
pairs(emco1)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.511 0.516 Inf   0.989  0.5837
##  (Bas-fond) - Reserve       -0.470 0.403 Inf  -1.166  0.4736
##  Ext_Reserve - Reserve      -0.981 0.479 Inf  -2.049  0.1008
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    1.099 0.775 Inf   1.418  0.3314
##  (Bas-fond) - Reserve        0.693 0.548 Inf   1.266  0.4148
##  Ext_Reserve - Reserve      -0.405 0.837 Inf  -0.485  0.8786
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.118 0.486 Inf  -0.242  0.9681
##  (Bas-fond) - Reserve       -0.811 0.425 Inf  -1.908  0.1362
##  Ext_Reserve - Reserve      -0.693 0.408 Inf  -1.698  0.2060
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emco2 <- lsmeans(glmco2, ~ site, by="saison")
pairs(emco2)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.223 0.671 Inf  -0.333  0.9408
##  (Bas-fond) - Reserve       -0.693 0.612 Inf  -1.132  0.4944
##  Ext_Reserve - Reserve      -0.470 0.570 Inf  -0.824  0.6878
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.223 0.606 Inf  -0.369  0.9279
##  (Bas-fond) - Reserve        1.792 1.080 Inf   1.659  0.2212
##  Ext_Reserve - Reserve       2.015 1.095 Inf   1.839  0.1568
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.405 0.913 Inf   0.444  0.8970
##  (Bas-fond) - Reserve       -0.981 0.677 Inf  -1.449  0.3159
##  Ext_Reserve - Reserve      -1.386 0.791 Inf  -1.754  0.1855
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

Autres - Richesse et abondance Filet

glmau1<-glmer(rspe ~ site*saison+(1|floraison), data = syntfiletau, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
glmau2<-glmer(rspe ~ site*saison+(1|floraison), data = syntpiegeau, family = poisson, nAGQ=2)
## boundary (singular) fit: see help('isSingular')
summary(glmau1)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntfiletau
## 
##      AIC      BIC   logLik deviance df.resid 
##     65.0     82.6    -22.5     45.0       33 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.56144 -0.59628 -0.09759  0.32081  3.04256 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 43, groups:  floraison, 17
## 
## Fixed effects:
##                               Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    1.43508    0.21822   6.576 4.82e-11 ***
## siteExt_Reserve               -0.15415    0.32121  -0.480   0.6313    
## siteReserve                   -0.47957    0.35291  -1.359   0.1742    
## saisonFevrier                 -0.74194    0.38421  -1.931   0.0535 .  
## saisonJuin                    -0.96508    0.41547  -2.323   0.0202 *  
## siteExt_Reserve:saisonFevrier -0.02817    0.63496  -0.044   0.9646    
## siteReserve:saisonFevrier      0.37421    0.57936   0.646   0.5183    
## siteExt_Reserve:saisonJuin     0.90792    0.53572   1.695   0.0901 .  
## siteReserve:saisonJuin         0.34604    0.62642   0.552   0.5807    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.679                                                 
## siteReserve -0.618  0.420                                          
## saisonFevrr -0.568  0.386  0.351                                   
## saisonJuin  -0.525  0.357  0.325  0.298                            
## stExt_Rsr:F  0.344 -0.506 -0.213 -0.605 -0.181                     
## stRsrv:ssnF  0.377 -0.256 -0.609 -0.663 -0.198  0.401              
## stExt_Rsr:J  0.407 -0.600 -0.252 -0.231 -0.776  0.303  0.153       
## stRsrv:ssnJ  0.348 -0.237 -0.563 -0.198 -0.663  0.120  0.343  0.514
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmau1)
## Analysis of Variance Table
##             npar Sum Sq Mean Sq F value
## site           2 3.8618  1.9309  1.9309
## saison         2 7.2933  3.6467  3.6467
## site:saison    4 4.1098  1.0274  1.0274
r.squaredGLMM(glmau1)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.2694296 0.2694296
## lognormal 0.3050565 0.3050565
## trigamma  0.2309662 0.2309662
summary(glmau2)
## Generalized linear mixed model fit by maximum likelihood (Adaptive
##   Gauss-Hermite Quadrature, nAGQ = 2) [glmerMod]
##  Family: poisson  ( log )
## Formula: rspe ~ site * saison + (1 | floraison)
##    Data: syntpiegeau
## 
##      AIC      BIC   logLik deviance df.resid 
##     35.9     48.4     -7.9     15.9       16 
## 
## Scaled residuals: 
##      Min       1Q   Median       3Q      Max 
## -1.41421 -0.55629  0.06455  0.50000  1.41421 
## 
## Random effects:
##  Groups    Name        Variance Std.Dev.
##  floraison (Intercept) 0        0       
## Number of obs: 26, groups:  floraison, 16
## 
## Fixed effects:
##                                 Estimate Std. Error z value Pr(>|z|)    
## (Intercept)                    1.386e+00  2.887e-01   4.802 1.57e-06 ***
## siteExt_Reserve                1.500e-13  4.082e-01   0.000   1.0000    
## siteReserve                   -8.701e-02  4.174e-01  -0.208   0.8349    
## saisonFevrier                  5.108e-01  3.651e-01   1.399   0.1618    
## saisonJuin                    -1.099e+00  5.774e-01  -1.903   0.0571 .  
## siteExt_Reserve:saisonFevrier  1.823e-01  5.284e-01   0.345   0.7300    
## siteReserve:saisonFevrier     -5.108e-01  5.614e-01  -0.910   0.3629    
## siteExt_Reserve:saisonJuin     8.109e-01  7.265e-01   1.116   0.2643    
## siteReserve:saisonJuin         6.466e-01  7.531e-01   0.859   0.3905    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Correlation of Fixed Effects:
##             (Intr) stEx_R stRsrv ssnFvr sasnJn sE_R:F stRs:F sE_R:J
## sitExt_Rsrv -0.707                                                 
## siteReserve -0.692  0.489                                          
## saisonFevrr -0.791  0.559  0.547                                   
## saisonJuin  -0.500  0.354  0.346  0.395                            
## stExt_Rsr:F  0.546 -0.773 -0.378 -0.691 -0.273                     
## stRsrv:ssnF  0.514 -0.364 -0.744 -0.650 -0.257  0.450              
## stExt_Rsr:J  0.397 -0.562 -0.275 -0.314 -0.795  0.434  0.204       
## stRsrv:ssnJ  0.383 -0.271 -0.554 -0.303 -0.767  0.209  0.412  0.609
## optimizer (Nelder_Mead) convergence code: 0 (OK)
## boundary (singular) fit: see help('isSingular')
anova(glmau2)
## Analysis of Variance Table
##             npar  Sum Sq Mean Sq F value
## site           2  3.2790  1.6395  1.6395
## saison         2 13.2554  6.6277  6.6277
## site:saison    4  3.4134  0.8533  0.8533
r.squaredGLMM(glmau2)
## Warning: the null model is correct only if all variables used by the original
## model remain unchanged.
##                 R2m       R2c
## delta     0.4782091 0.4782091
## lognormal 0.5082390 0.5082390
## trigamma  0.4446735 0.4446735
plot(simulateResiduals(glmau1))

plot(simulateResiduals(glmau2))

emau1 <- lsmeans(glmau1, ~ site, by="saison")
pairs(emau1)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.154 0.321 Inf   0.480  0.8808
##  (Bas-fond) - Reserve        0.480 0.353 Inf   1.359  0.3627
##  Ext_Reserve - Reserve       0.325 0.364 Inf   0.894  0.6440
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.182 0.548 Inf   0.333  0.9408
##  (Bas-fond) - Reserve        0.105 0.459 Inf   0.229  0.9714
##  Ext_Reserve - Reserve      -0.077 0.558 Inf  -0.138  0.9896
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.754 0.429 Inf  -1.758  0.1839
##  (Bas-fond) - Reserve        0.134 0.518 Inf   0.258  0.9640
##  Ext_Reserve - Reserve       0.887 0.449 Inf   1.976  0.1182
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates
emau2 <- lsmeans(glmau2, ~ site, by="saison")
pairs(emau2)
## saison = Aout:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve    0.000 0.408 Inf   0.000  1.0000
##  (Bas-fond) - Reserve        0.087 0.417 Inf   0.208  0.9763
##  Ext_Reserve - Reserve       0.087 0.417 Inf   0.208  0.9763
## 
## saison = Fevrier:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.182 0.335 Inf  -0.544  0.8498
##  (Bas-fond) - Reserve        0.598 0.375 Inf   1.593  0.2488
##  Ext_Reserve - Reserve       0.780 0.392 Inf   1.992  0.1142
## 
## saison = Juin:
##  contrast                 estimate    SE  df z.ratio p.value
##  (Bas-fond) - Ext_Reserve   -0.811 0.601 Inf  -1.349  0.3678
##  (Bas-fond) - Reserve       -0.560 0.627 Inf  -0.893  0.6448
##  Ext_Reserve - Reserve       0.251 0.504 Inf   0.499  0.8719
## 
## Results are given on the log (not the response) scale. 
## P value adjustment: tukey method for comparing a family of 3 estimates

#Annexe : Permanova Saison selon les Ordres

#Supprimer les lignes vides
m_filet<-filet[,1:406]

m_fileth<-subset(m_filet,m_filet$ordre=="Hymenoptera")
m_fileth$nul<-apply(m_fileth[,6:406],1,sum)
m_fileth<-subset(m_fileth,m_fileth$nul !=0)

m_piege<-piege[,1:406]

m_piegeh<-subset(m_piege,m_piege$ordre=="Hymenoptera")
m_piegeh$nul<-apply(m_piegeh[,6:406],1,sum)
m_piegeh<-subset(m_piegeh,m_piegeh$nul !=0)

# Résultats
filet.divh<-adonis2(m_fileth[,6:406]~as.factor(m_fileth$Saison), data=m_fileth, permutations=5000)
filet.divh
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_fileth[, 6:406] ~ as.factor(m_fileth$Saison), data = m_fileth, permutations = 5000)
##                            Df SumOfSqs      R2      F Pr(>F)    
## as.factor(m_fileth$Saison)  2    3.999 0.23264 6.0635  2e-04 ***
## Residual                   40   13.190 0.76736                  
## Total                      42   17.189 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
piege.divh<-adonis2(m_piegeh[,6:406]~as.factor(m_piegeh$Saison), data=m_piegeh, permutations=5000)
piege.divh
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piegeh[, 6:406] ~ as.factor(m_piegeh$Saison), data = m_piegeh, permutations = 5000)
##                            Df SumOfSqs      R2      F Pr(>F)    
## as.factor(m_piegeh$Saison)  2   1.9716 0.16878 2.3351  2e-04 ***
## Residual                   23   9.7099 0.83122                  
## Total                      25  11.6816 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Diptera

m_filetd<-subset(m_filet,m_filet$ordre=="Diptera")
m_filetd$nul<-apply(m_filetd[,6:406],1,sum)
m_filetd<-subset(m_filetd,m_filetd$nul !=0)

m_pieged<-subset(m_piege,m_piege$ordre=="Diptera")
m_pieged$nul<-apply(m_pieged[,6:406],1,sum)
m_pieged<-subset(m_pieged,m_pieged$nul !=0)

# Résultats
filet.divd<-adonis2(m_filetd[,6:406]~as.factor(m_filetd$Saison), data=m_filetd, permutations=5000)
filet.divd
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_filetd[, 6:406] ~ as.factor(m_filetd$Saison), data = m_filetd, permutations = 5000)
##                            Df SumOfSqs      R2     F Pr(>F)    
## as.factor(m_filetd$Saison)  2   4.8161 0.28055 7.409  2e-04 ***
## Residual                   38  12.3508 0.71945                 
## Total                      40  17.1669 1.00000                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
piege.divd<-adonis2(m_pieged[,6:406]~as.factor(m_pieged$Saison), data=m_pieged, permutations=5000)
piege.divd
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_pieged[, 6:406] ~ as.factor(m_pieged$Saison), data = m_pieged, permutations = 5000)
##                            Df SumOfSqs     R2      F Pr(>F)    
## as.factor(m_pieged$Saison)  2   2.4271 0.2052 3.0982  2e-04 ***
## Residual                   24   9.4006 0.7948                  
## Total                      26  11.8277 1.0000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Coleoptera

m_filetc<-subset(m_filet,m_filet$ordre=="Coleoptera")
m_filetc$nul<-apply(m_filetc[,6:406],1,sum)
m_filetc<-subset(m_filetc,m_filetc$nul !=0)

m_piegec<-subset(m_piege,m_piege$ordre=="Coleoptera")
m_piegec$nul<-apply(m_piegec[,6:406],1,sum)
m_piegec<-subset(m_piegec,m_piegec$nul !=0)

# Résultats
filet.divc<-adonis2(m_filetc[,6:406]~as.factor(m_filetc$Saison), data=m_filetc, permutations=5000)
filet.divc
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_filetc[, 6:406] ~ as.factor(m_filetc$Saison), data = m_filetc, permutations = 5000)
##                            Df SumOfSqs      R2      F Pr(>F)    
## as.factor(m_filetc$Saison)  2   2.6351 0.16294 3.4064  2e-04 ***
## Residual                   35  13.5374 0.83706                  
## Total                      37  16.1726 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
piege.divc<-adonis2(m_piegec[,6:406]~as.factor(m_piegec$Saison), data=m_piegec, permutations=5000)
piege.divc
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piegec[, 6:406] ~ as.factor(m_piegec$Saison), data = m_piegec, permutations = 5000)
##                            Df SumOfSqs      R2      F    Pr(>F)    
## as.factor(m_piegec$Saison)  2   1.7423 0.19102 2.1252 0.0009998 ***
## Residual                   18   7.3786 0.80898                     
## Total                      20   9.1209 1.00000                     
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Autres

m_fileta<-subset(m_filet,m_filet$ordre=="Autres")
m_fileta$nul<-apply(m_fileta[,6:406],1,sum)
m_fileta<-subset(m_fileta,m_fileta$nul !=0)

m_piegea<-subset(m_piege,m_piege$ordre=="Autres")
m_piegea$nul<-apply(m_piegea[,6:406],1,sum)
m_piegea<-subset(m_piegea,m_piegea$nul !=0)

# Résultats
filet.diva<-adonis2(m_fileta[,6:406]~as.factor(m_fileta$Saison), data=m_fileta, permutations=5000)
filet.diva
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_fileta[, 6:406] ~ as.factor(m_fileta$Saison), data = m_fileta, permutations = 5000)
##                            Df SumOfSqs     R2      F Pr(>F)    
## as.factor(m_fileta$Saison)  2   2.7792 0.1641 3.5338  2e-04 ***
## Residual                   36  14.1564 0.8359                  
## Total                      38  16.9355 1.0000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
piege.diva<-adonis2(m_piegea[,6:406]~as.factor(m_piegea$Saison), data=m_piegea, permutations=5000)
piege.diva
## Permutation test for adonis under reduced model
## Terms added sequentially (first to last)
## Permutation: free
## Number of permutations: 5000
## 
## adonis2(formula = m_piegea[, 6:406] ~ as.factor(m_piegea$Saison), data = m_piegea, permutations = 5000)
##                            Df SumOfSqs      R2      F Pr(>F)    
## as.factor(m_piegea$Saison)  2   3.4375 0.32891 5.8813  2e-04 ***
## Residual                   24   7.0138 0.67109                  
## Total                      26  10.4513 1.00000                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#Beta de Jaccard

library("entropart")
fipiaout<-subset(fipi, fipi$Saison=="Aout")
fipifev<-subset(fipi, fipi$Saison=="Fevrier")
fipijuin<-subset(fipi, fipi$Saison=="Juin")
sum(fipiaout[,6:406])
## [1] 985
sum(fipifev[,6:406])
## [1] 1134
sum(fipijuin[,6:406])
## [1] 1082
filetallaout<-subset(filetall, filetall$Saison=="Aout")
filetalljuin<-subset(filetall, filetall$Saison=="Juin")
filetallfev<-subset(filetall, filetall$Saison=="Fevrier")

sum(filetallaout[,6:406])
## [1] 401
sum(filetalljuin[,6:406])
## [1] 458
sum(filetallfev[,6:406])
## [1] 611
library(dplyr)
fipiaoutb<-summarise_each(fipiaout[,6:406],funs(sum))
## Warning: `summarise_each_()` was deprecated in dplyr 0.7.0.
## ℹ Please use `across()` instead.
## ℹ The deprecated feature was likely used in the dplyr package.
##   Please report the issue at <https://github.com/tidyverse/dplyr/issues>.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
## Warning: `funs()` was deprecated in dplyr 0.8.0.
## ℹ Please use a list of either functions or lambdas:
## 
## # Simple named list: list(mean = mean, median = median)
## 
## # Auto named with `tibble::lst()`: tibble::lst(mean, median)
## 
## # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
fipiaoutb<-t(fipiaoutb)
fipiaoutb<-data.frame(fipiaoutb)
fipiaoutb$presence<-fipiaoutb$fipiaoutb
fipiaoutb$presence<-as.numeric(fipiaoutb$presence)
#Dissimilarité Beta de Jaccard
library("dplyr")
library("ade4")
fipiaoutc<-summarise_each(fipiaout[,6:406], funs(sum))
## Warning: `funs()` was deprecated in dplyr 0.8.0.
## ℹ Please use a list of either functions or lambdas:
## 
## # Simple named list: list(mean = mean, median = median)
## 
## # Auto named with `tibble::lst()`: tibble::lst(mean, median)
## 
## # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
row.names(fipiaoutc)<-"Aout"

fipijuinc<-summarise_each(fipijuin[,6:406], funs(sum))
## Warning: `funs()` was deprecated in dplyr 0.8.0.
## ℹ Please use a list of either functions or lambdas:
## 
## # Simple named list: list(mean = mean, median = median)
## 
## # Auto named with `tibble::lst()`: tibble::lst(mean, median)
## 
## # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
row.names(fipijuinc)<-"Juin"

fipifevc<-summarise_each(fipifev[,6:406], funs(sum))
## Warning: `funs()` was deprecated in dplyr 0.8.0.
## ℹ Please use a list of either functions or lambdas:
## 
## # Simple named list: list(mean = mean, median = median)
## 
## # Auto named with `tibble::lst()`: tibble::lst(mean, median)
## 
## # Using lambdas list(~ mean(., trim = .2), ~ median(., na.rm = TRUE))
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.
row.names(fipifevc)<-"Fevrier"

fejuau<-bind_rows(fipifevc,fipiaoutc)
fejuau<-bind_rows(fejuau,fipijuinc)

DistJaccard <- dist.binary(fejuau, method = 1)
DistJaccard 
##        Fevrier      Aout
## Aout 0.8891347          
## Juin 0.9150794 0.9205043

Somme des espèces par saison

fipiaouta<-fipiaout[,6:406]
fipiaout2<-apply(fipiaouta,2,sum)
fipiaoutb<-bind_rows(fipiaouta,fipiaout2)
fipiaoutc<-t(fipiaoutb)
fipiaoutc<-data.frame(fipiaoutc)
fipiaoutc$somme<-fipiaoutc[,101]
fipiaoutd<-filter(fipiaoutc, fipiaoutc$somme > 0)
length(fipiaoutd$somme)
## [1] 188
fipifeva<-fipifev[,6:406]
fipifev2<-apply(fipifeva,2,sum)
fipifevb<-bind_rows(fipifeva,fipifev2)
fipifevc<-t(fipifevb)
fipifevc<-data.frame(fipifevc)
fipifevc$somme<-fipifevc[,85]
fipifevd<-filter(fipifevc, fipifevc$somme > 0)
length(fipifevd$somme)
## [1] 222
fipijuina<-fipijuin[,6:406]
fipijuin2<-apply(fipijuina,2,sum)
fipijuinb<-bind_rows(fipijuina,fipijuin2)
fipijuinc<-t(fipijuinb)
fipijuinc<-data.frame(fipijuinc)
fipijuinc$somme<-fipijuinc[,97]
fipijuind<-filter(fipijuinc, fipijuinc$somme > 0)
length(fipijuind$somme)
## [1] 114

#Relation floraison / diversité

ultrapoll<-bind_rows(syntppoll,syntfpoll)
ultrapoll$floraison<-as.numeric(ultrapoll$floraison)
glmflor<-lmer(rspe ~ floraison + (1|saison), data = ultrapoll) #Estimation des paramètres du modèle par la Quadrature de Gauss-Hermite (Bolker, 2008) 
summary(glmflor)
## Linear mixed model fit by REML ['lmerMod']
## Formula: rspe ~ floraison + (1 | saison)
##    Data: ultrapoll
## 
## REML criterion at convergence: 324.3
## 
## Scaled residuals: 
##     Min      1Q  Median      3Q     Max 
## -1.7267 -0.5667 -0.1537  0.3168  4.1604 
## 
## Random effects:
##  Groups   Name        Variance Std.Dev.
##  saison   (Intercept) 1.541    1.241   
##  Residual             5.880    2.425   
## Number of obs: 69, groups:  saison, 3
## 
## Fixed effects:
##             Estimate Std. Error t value
## (Intercept)  3.00700    0.90761   3.313
## floraison    0.07703    0.06260   1.231
## 
## Correlation of Fixed Effects:
##           (Intr)
## floraison -0.522
Anova(glmflor, type=2, method="chisq") #methode chis2 car glmer et type 3 car plan déséquilibré et présence d'une interaction
## Analysis of Deviance Table (Type II Wald chisquare tests)
## 
## Response: rspe
##            Chisq Df Pr(>Chisq)
## floraison 1.5143  1     0.2185
#Test des résidus
plot(glmflor)